Skip to content

Commit

Permalink
fixed a bug where the user was unable to search for variants without …
Browse files Browse the repository at this point in the history
…classification
  • Loading branch information
MarvinDo committed Oct 31, 2023
1 parent 33bcb55 commit 8cfe0c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/frontend_celery/webapp/utils/search_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,21 @@ def extract_genes(request_obj):


def extract_consensus_classifications(request_obj, allowed_classes):
classes = allowed_classes + ['-']
consensus_classifications = request_obj.args.getlist('consensus')
consensus_classifications = ';'.join(consensus_classifications)
regex_inner = '|'.join(allowed_classes)
regex_inner = '|'.join(classes)
regex_inner = regex_inner.replace('+', '\+')
consensus_classifications = preprocess_query(consensus_classifications, r'(' + regex_inner + r')?')
if consensus_classifications is None:
flash("You have an error in your consensus class query(s). It must consist of a number between 1-5, 3+, 3- or M. Results are not filtered by consensus classification.", "alert-danger")
return consensus_classifications

def extract_user_classifications(request_obj, allowed_classes):
classes = allowed_classes + ['-']
user_classifications = request_obj.args.getlist('user')
user_classifications = ';'.join(user_classifications)
regex_inner = '|'.join(allowed_classes)
regex_inner = '|'.join(classes)
regex_inner = regex_inner.replace('+', '\+')
user_classifications = preprocess_query(user_classifications, r'(' + regex_inner + r')?')
if user_classifications is None:
Expand Down

0 comments on commit 8cfe0c0

Please sign in to comment.