diff options
-rw-r--r-- | gn2/wqflask/do_search.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gn2/wqflask/do_search.py b/gn2/wqflask/do_search.py index 3c81783d..a40614db 100644 --- a/gn2/wqflask/do_search.py +++ b/gn2/wqflask/do_search.py @@ -254,8 +254,10 @@ class PhenotypeSearch(DoSearch): # and comment here # if "'" not in self.search_term[0]: - search_term = "%" + \ - self.handle_wildcard(self.search_term[0]) + "%" + search_term = self.search_term[0] + if not self.search_term[0].isnumeric() or len(self.search_term[0]) != 5: # To make sure phenotype trait IDs aren't included in a fulltext search + 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( |