diff --git a/src/frontend_celery/webapp/utils/search_utils.py b/src/frontend_celery/webapp/utils/search_utils.py index d6007aeb..1d4c67d0 100644 --- a/src/frontend_celery/webapp/utils/search_utils.py +++ b/src/frontend_celery/webapp/utils/search_utils.py @@ -67,9 +67,10 @@ 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: @@ -77,9 +78,10 @@ def extract_consensus_classifications(request_obj, allowed_classes): 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: