Merge branch 'feature/spec_files_wthout_db' of github.com:sartography/cr-connect-workflow into feature/spec_files_wthout_db

This commit is contained in:
Dan 2022-02-10 11:34:56 -05:00
commit 3ebffeed33
2 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ def all_specifications(libraries=False,standalone=False):
# return standard workflows (not library, not standalone)
specs = spec_service.get_specs()
specs.append(spec_service.get_master_spec())
return WorkflowSpecInfoSchema(many=True).dump(specs)

View File

@ -60,6 +60,8 @@ class WorkflowSpecService(FileSystemService):
def get_spec(self, spec_id):
if not os.path.exists(FileSystemService.root_path()):
return # Nothing to scan yet. There are no files.
if spec_id == 'master_spec':
return self.get_master_spec()
with os.scandir(FileSystemService.root_path()) as category_dirs:
for item in category_dirs:
category_dir = item