Skip to content

Commit

Permalink
modifying genomicVariations for g_variants in ontology filter scope
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Sep 22, 2023
1 parent 8df0188 commit 87d86d6
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions beacon/db/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ def apply_ontology_filter(query: dict, filter: OntologyFilter, collection: str)
query_filtering={}
query_filtering['$and']=[]
dict_scope={}
dict_scope['scope']=collection
if collection == 'g_variants':
dict_scope['scope']='genomicVariations'
else:
dict_scope['scope']=collection
query_filtering['$and'].append(dict_scope)
dict_id={}
dict_id['id']=filter.id
Expand Down Expand Up @@ -163,7 +166,10 @@ def apply_ontology_filter(query: dict, filter: OntologyFilter, collection: str)
query_filtering={}
query_filtering['$and']=[]
dict_scope={}
dict_scope['scope']=collection
if collection == 'g_variants':
dict_scope['scope']='genomicVariations'
else:
dict_scope['scope']=collection
query_filtering['$and'].append(dict_scope)
dict_id={}
dict_id['id']=filter.id
Expand Down Expand Up @@ -208,7 +214,10 @@ def apply_ontology_filter(query: dict, filter: OntologyFilter, collection: str)
query_filtering={}
query_filtering['$and']=[]
dict_scope={}
dict_scope['scope']=collection
if collection == 'g_variants':
dict_scope['scope']='genomicVariations'
else:
dict_scope['scope']=collection
query_filtering['$and'].append(dict_scope)
dict_id={}
dict_id['id']=filter.id
Expand Down

0 comments on commit 87d86d6

Please sign in to comment.