Skip to content

Commit

Permalink
readding individuals params
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Oct 3, 2023
1 parent f3d9403 commit 4253bea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions beacon/db/individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def include_resultset_responses(query: Dict[str, List[dict]], qparams: RequestPa

def apply_request_parameters(query: Dict[str, List[dict]], qparams: RequestParams):
LOG.debug("Request parameters len = {}".format(len(qparams.query.request_parameters)))
v_list=[]
query_2={}
for k, v in qparams.query.request_parameters.items():
LOG.debug(k)
Expand Down Expand Up @@ -81,6 +82,15 @@ def apply_request_parameters(query: Dict[str, List[dict]], qparams: RequestParam
query_2["$or"].append({'id': case["biosampleId"]})

LOG.debug(query_2)
elif ',' in v:
v_list =v.split(',')
LOG.debug(v_list)
else:
v_list.append(v)
for id in v_list:
v_dict={}
v_dict['id']=id
qparams.query.filters.append(v_dict)



Expand Down

0 comments on commit 4253bea

Please sign in to comment.