Skip to content

Commit

Permalink
fixed dataset and cohorts response by id
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Jul 19, 2023
1 parent 0e7e8e6 commit 213867b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions beacon/response/build_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ def build_beacon_resultset_response_by_dataset(data,
elif doc['individualId'] in dataset_dict['ids'][0]['individualIds']:
dataset_id = dataset_dict['dataset']
response_dict[dataset_id].append(doc)
elif str(entity_schema) == 'DefaultSchemas.DATASETS':
if doc['id'] == dataset_dict['dataset']:
dataset_id = dataset_dict['dataset']
response_dict[dataset_id].append(doc)
elif str(entity_schema) == 'DefaultSchemas.COHORTS':
if doc['id'] == dataset_dict['dataset']:
dataset_id = dataset_dict['dataset']
response_dict[dataset_id].append(doc)
else:
if doc['id'] in dataset_dict['ids'][0]['biosampleIds']:
dataset_id = dataset_dict['dataset']
Expand Down

0 comments on commit 213867b

Please sign in to comment.