mirror of
https://github.com/sartography/spiffworkflow-backend.git
synced 2025-02-23 12:58:13 +00:00
use correct separator.
This commit is contained in:
parent
7866730f2f
commit
8ffd6203ce
@ -31,10 +31,17 @@ class FileSystemService:
|
||||
app_root = current_app.root_path
|
||||
return os.path.join(app_root, "..", dir_name)
|
||||
|
||||
@staticmethod
|
||||
def id_string_to_relative_path(id_string):
|
||||
return id_string.replace("/", os.sep)
|
||||
|
||||
@staticmethod
|
||||
def process_group_path(name: str) -> str:
|
||||
"""Category_path."""
|
||||
return os.path.abspath(os.path.join(FileSystemService.root_path(), name))
|
||||
return os.path.abspath(os.path.join(
|
||||
FileSystemService.root_path(),
|
||||
FileSystemService.id_string_to_relative_path(name)
|
||||
))
|
||||
|
||||
@staticmethod
|
||||
def full_path_from_relative_path(relative_path: str) -> str:
|
||||
|
@ -207,7 +207,10 @@ class ProcessModelService(FileSystemService):
|
||||
"""Look for a given process_group, and return it."""
|
||||
if os.path.exists(FileSystemService.root_path()):
|
||||
process_group_path = os.path.abspath(
|
||||
os.path.join(FileSystemService.root_path(), process_group_id)
|
||||
os.path.join(
|
||||
FileSystemService.root_path(),
|
||||
FileSystemService.id_string_to_relative_path(process_group_id)
|
||||
)
|
||||
)
|
||||
if self.is_group(process_group_path):
|
||||
return self.__scan_process_group(process_group_path)
|
||||
|
@ -2384,7 +2384,7 @@ class TestProcessApi(BaseTest):
|
||||
for group in groups:
|
||||
persisted = ProcessModelService().get_process_group(group)
|
||||
assert persisted is not None
|
||||
assert persisted.id_for_file_path() == group
|
||||
assert persisted.id == group
|
||||
|
||||
def test_move_model(
|
||||
self,
|
||||
|
Loading…
x
Reference in New Issue
Block a user