From b551535ad979a907f47c2d4849aadcfb4c036793 Mon Sep 17 00:00:00 2001 From: Vincent Emonet Date: Fri, 2 Aug 2024 16:52:34 +0200 Subject: [PATCH] auto create cohorts folder when does not exist --- backend/src/upload.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/upload.py b/backend/src/upload.py index c0a069a..f039176 100644 --- a/backend/src/upload.py +++ b/backend/src/upload.py @@ -475,6 +475,7 @@ def init_triplestore() -> None: if publish_graph_to_endpoint(g): print(f"🦉 Triplestore initialization: added {len(g)} triples for the iCARE4CVD Cohort Explorer OWL ontology.") + os.makedirs(os.path.join(settings.data_folder, "cohorts"), exist_ok=True) # Load cohorts data dictionaries already present in data/cohorts/ for folder in os.listdir(os.path.join(settings.data_folder, "cohorts")): folder_path = os.path.join(settings.data_folder, "cohorts", folder)