aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorzsloan2024-06-11 21:55:43 +0000
committerzsloan2024-06-27 14:34:42 -0500
commit5f80fe74a43fe1743851c9bd9840ed97afd8420d (patch)
tree469d35af718fa1b908bb3c0908f71250c546a8ee /gn2
parent1c8c7073e9e261630cad418d57ac72a0944fc412 (diff)
downloadgenenetwork2-5f80fe74a43fe1743851c9bd9840ed97afd8420d.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])