Skip to content

Commit

Permalink
fix airlock
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Apr 11, 2024
1 parent 1d1663e commit 4d6972b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion backend/src/decentriq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions backend/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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)],
)
Expand Down

0 comments on commit 4d6972b

Please sign in to comment.