aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/do_search.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/do_search.py')
-rw-r--r--wqflask/wqflask/do_search.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py
index 5cb06305..b56a858a 100644
--- a/wqflask/wqflask/do_search.py
+++ b/wqflask/wqflask/do_search.py
@@ -37,10 +37,6 @@ class DoSearch(object):
logger.debug("self.dataset.group is: ", pf(self.dataset.group))
#Get group information for dataset and the species id
- if self.dataset.type == "Publish":
- if len(self.search_term[0].split("_")) > 1:
- self.search_term[0] = self.search_term[0].split("_")[1]
-
self.species_id = webqtlDatabaseFunction.retrieve_species_id(self.dataset.group.name)
def execute(self, query):
@@ -234,8 +230,11 @@ class PhenotypeSearch(DoSearch):
#Todo: Zach will figure out exactly what both these lines mean
#and comment here
- if "'" not in self.search_term[0]:
- search_term = "[[:<:]]" + self.handle_wildcard(self.search_term[0]) + "[[:>:]]"
+ #if "'" not in self.search_term[0]:
+ search_term = "[[:<:]]" + self.handle_wildcard(self.search_term[0]) + "[[:>:]]"
+ if "_" in self.search_term[0]:
+ if len(self.search_term[0].split("_")[0]) == 3:
+ search_term = "[[:<:]]" + self.handle_wildcard(self.search_term[0].split("_")[1]) + "[[:>:]]"
# This adds a clause to the query that matches the search term
# against each field in the search_fields tuple