aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-02-21 12:13:59 -0600
committerzsloan2020-02-21 12:13:59 -0600
commite7425fb74724a8ee3965cc0e588bad9aff335487 (patch)
tree83e1062c156ea5f4300a93c47d289be9ae65cf74
parentb9d63ce7eb4a6846f6da9afc824fc072df6babe7 (diff)
downloadgenenetwork2-e7425fb74724a8ee3965cc0e588bad9aff335487.tar.gz
Bad searches should now return a nicer error page
-rw-r--r--wqflask/wqflask/search_results.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index c44436d8..d76add67 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -81,7 +81,12 @@ views.py).
assert(is_str(kw.get('dataset')))
self.dataset = create_dataset(kw['dataset'], dataset_type)
logger.debug("search_terms:", self.search_terms)
- self.search()
+
+ #ZS: I don't like using try/except, but it seems like the easiest way to account for all possible bad searches here
+ try:
+ self.search()
+ except:
+ self.search_term_exists = False
if self.search_term_exists:
self.gen_search_result()