mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-29 11:15:00 +00:00
store bpmn_file_relative_path using correct slashes w/ burnettk
This commit is contained in:
parent
e0c8f118fd
commit
229117fc78
@ -2,6 +2,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
|
import os
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from dataclasses import field
|
from dataclasses import field
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -50,6 +51,10 @@ class ProcessModelInfo:
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# for use with os.path.join so it can work on windows
|
||||||
|
def id_for_file_path(self) -> str:
|
||||||
|
return self.id.replace("/", os.sep)
|
||||||
|
|
||||||
|
|
||||||
class ProcessModelInfoSchema(Schema):
|
class ProcessModelInfoSchema(Schema):
|
||||||
"""ProcessModelInfoSchema."""
|
"""ProcessModelInfoSchema."""
|
||||||
|
@ -375,7 +375,7 @@ class SpecFileService(FileSystemService):
|
|||||||
process_model_info: ProcessModelInfo, bpmn_file_name: str, et_root: _Element
|
process_model_info: ProcessModelInfo, bpmn_file_name: str, et_root: _Element
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Store_bpmn_process_identifiers."""
|
"""Store_bpmn_process_identifiers."""
|
||||||
relative_process_model_path = process_model_info.id
|
relative_process_model_path = process_model_info.id_for_file_path()
|
||||||
|
|
||||||
relative_bpmn_file_path = os.path.join(
|
relative_bpmn_file_path = os.path.join(
|
||||||
relative_process_model_path, bpmn_file_name
|
relative_process_model_path, bpmn_file_name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user