diff --git a/backend/src/decentriq.py b/backend/src/decentriq.py index f306a63..5262d05 100644 --- a/backend/src/decentriq.py +++ b/backend/src/decentriq.py @@ -168,7 +168,9 @@ async def create_compute_dcr( data_nodes.append(data_node_id) # TODO: made airlock always True for testing - if cohort.airlock: + # if cohort.airlock: + print(f"AIRLOCK {cohort.airlock}") + if True: # Add airlock node to make it easy to access small part of the dataset preview_node_id = f"preview-{data_node_id}" builder.add_node_definition(PreviewComputeNodeDefinition( diff --git a/backend/src/utils.py b/backend/src/utils.py index c3c8bc5..717717b 100644 --- a/backend/src/utils.py +++ b/backend/src/utils.py @@ -129,7 +129,7 @@ def retrieve_cohorts_metadata(user_email: str) -> dict[str, Cohort]: # Initialize cohort data structure if not exists if cohort_id and cohort_id not in target_dict: target_dict[cohort_id] = Cohort( - cohort_id=row["cohortId"]["value"], # Assuming cohortId is always present + cohort_id=row["cohortId"]["value"], cohort_type=get_value("cohortType", row), cohort_email=[get_value("cohortEmail", row)] if get_value("cohortEmail", row) else [], # owner=get_value("owner", row), @@ -140,7 +140,7 @@ def retrieve_cohorts_metadata(user_email: str) -> dict[str, Cohort]: study_ongoing=get_value("study_ongoing", row), study_population=get_value("study_population", row), study_objective=get_value("study_objective", row), - variables={}, # You might want to populate this separately, depending on your data structure + variables={}, airlock=get_bool_value("airlock", row), can_edit=user_email in [*settings.admins_list, get_value("cohortEmail", row)], )