Skip to content

Commit

Permalink
filter id required cross query
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Apr 5, 2024
1 parent bb3e515 commit c5b3ec8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions beacon/db/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

LOG = logging.getLogger(__name__)

CURIE_REGEX = r'^([a-zA-Z0-9]*):\/?[a-zA-Z0-9]*$'
CURIE_REGEX = r'^([a-zA-Z0-9]*):\/?[a-zA-Z0-9./]*$'

def cross_query(query: dict, scope: str, collection: str, request_parameters: dict):
if scope == 'genomicVariation' and collection == 'g_variants' or scope == collection[0:-1]:
Expand Down Expand Up @@ -411,7 +411,7 @@ def apply_ontology_filter(query: dict, filter: OntologyFilter, collection: str,
scope = filter.scope
if scope is None:
scope = collection[0:-1]

LOG.debug(scope)
is_filter_id_required = True
# Search similar
if filter.similarity != Similarity.EXACT:
Expand Down Expand Up @@ -614,6 +614,7 @@ def apply_ontology_filter(query: dict, filter: OntologyFilter, collection: str,
new_query['$or'].append(query)
query = new_query
LOG.debug(query)
query=cross_query(query, scope, collection, request_parameters)


#LOG.debug("QUERY: %s", query)
Expand Down

0 comments on commit c5b3ec8

Please sign in to comment.