aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorzsloan2024-06-11 21:55:43 +0000
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commita8fbfe865678f68bdbfc7b7b67b47719b1a3356c (patch)
tree9e0a735c539fa19bf4d91cba13aa7076c45cb475 /gn2
parentb8b0ff42bf79191c6f74227e5d946a573dd8de33 (diff)
downloadgenenetwork2-a8fbfe865678f68bdbfc7b7b67b47719b1a3356c.tar.gz
Raise ValueError if dataset type isn't ProbeSet/Publish/Geno
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/search_results.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn2/wqflask/search_results.py b/gn2/wqflask/search_results.py
index 0bdeb958..67cebf56 100644
--- a/gn2/wqflask/search_results.py
+++ b/gn2/wqflask/search_results.py
@@ -445,8 +445,8 @@ def generate_xapian_request(dataset, search_terms, and_or):
search_type = "phenotype"
case "Geno":
search_type = "genotype"
- case _: # This should never happen, not sure if it's necessary
- search_type = "gene"
+ case _: # This should never happen
+ raise ValueError(f"Dataset types should only be ProbeSet, Publish, or Geno, not '{dataset.type}'")
xapian_terms = and_or.join([create_xapian_term(dataset, term) for term in search_terms])