mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-19 06:31:14 +00:00
add id_for_file_path helper method for process groups
This commit is contained in:
parent
6e039c1a88
commit
891ea7a92a
@ -10,6 +10,8 @@ import marshmallow
|
|||||||
from marshmallow import post_load
|
from marshmallow import post_load
|
||||||
from marshmallow import Schema
|
from marshmallow import Schema
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
from spiffworkflow_backend.models.process_model import ProcessModelInfo
|
||||||
|
|
||||||
|
|
||||||
@ -47,6 +49,11 @@ class ProcessGroup:
|
|||||||
original_dict = dataclasses.asdict(self)
|
original_dict = dataclasses.asdict(self)
|
||||||
return {x: original_dict[x] for x in original_dict if x not in ["sort_index"]}
|
return {x: original_dict[x] for x in original_dict if x not in ["sort_index"]}
|
||||||
|
|
||||||
|
# for use with os.path.join, so it can work on windows
|
||||||
|
def id_for_file_path(self) -> str:
|
||||||
|
"""Id_for_file_path."""
|
||||||
|
return self.id.replace("/", os.sep)
|
||||||
|
|
||||||
|
|
||||||
class ProcessGroupSchema(Schema):
|
class ProcessGroupSchema(Schema):
|
||||||
"""ProcessGroupSchema."""
|
"""ProcessGroupSchema."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user