aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()