aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2018-03-29 07:46:14 +0000
committerPjotr Prins2018-03-29 07:46:39 +0000
commitbabe7424bfc06b2436b6e824389cf795afdf0a73 (patch)
treef96222fb69fd52ede7c0645a926a42b362c061ae /wqflask
parentdeaf64d3621285382621f4579db30e79f43651cb (diff)
downloadgenenetwork2-babe7424bfc06b2436b6e824389cf795afdf0a73.tar.gz
Illegal search term corrected treatment and no longer shows as error in logs
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/search_results.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 59e100d8..ca40f849 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -64,14 +64,23 @@ views.py).
else:
self.and_or = "and"
self.search_terms = kw['search_terms_and']
- self.search_term_exists = True
+ if "http:" in self.search_terms:
+ self.search_term_exists = False
+ return
+ else:
+ self.search_term_exists = True
+
self.results = []
- if kw['type'] == "Phenotypes": # split datatype on type field
+ type = kw.get('type')
+ if type == "Phenotypes": # split datatype on type field
dataset_type = "Publish"
- elif kw['type'] == "Genotypes":
+ elif type == "Genotypes":
dataset_type = "Geno"
- else:
+ elif type == "ProbeSet":
dataset_type = "ProbeSet" # ProbeSet is default
+ else:
+ self.search_term_exists = False
+ return
self.dataset = create_dataset(kw['dataset'], dataset_type)
logger.debug("search_terms:", self.search_terms)
self.search()