diff options
-rwxr-xr-x | wqflask/wqflask/search_results.py | 26 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/marker_regression.html | 10 |
2 files changed, 25 insertions, 11 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index 12ea44d8..fb03f027 100755 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -93,8 +93,10 @@ class SearchResultPage(object): else: dataset_type = "ProbeSet" self.dataset = create_dataset(kw['dataset'], dataset_type) + print("KEYWORD:", self.search_terms) self.search() - self.gen_search_result() + if self.search_term_exists: + self.gen_search_result() @@ -253,15 +255,19 @@ class SearchResultPage(object): results = the_search.execute(final_query) self.results.extend(results) else: - for a_search in self.search_terms: - the_search = self.get_search_ob(a_search) - if the_search != None: - self.results.extend(the_search.run()) - else: - self.search_term_exists = False - - if the_search != None: - self.header_fields = the_search.header_fields + if self.search_terms == []: + self.search_term_exists = False + else: + for a_search in self.search_terms: + the_search = self.get_search_ob(a_search) + if the_search != None: + self.results.extend(the_search.run()) + else: + self.search_term_exists = False + + if self.search_term_exists: + if the_search != None: + self.header_fields = the_search.header_fields def get_search_ob(self, a_search): print("[kodak] item is:", pf(a_search)) diff --git a/wqflask/wqflask/templates/marker_regression.html b/wqflask/wqflask/templates/marker_regression.html index ad117337..b633f815 100755 --- a/wqflask/wqflask/templates/marker_regression.html +++ b/wqflask/wqflask/templates/marker_regression.html @@ -62,7 +62,15 @@ {% endif %} <td>{{marker.chr}}</td> <td>{{ '%0.6f' | format(marker.Mb|float) }}</td> - <td>{{marker.name}}</td> + <td> + {{ marker.name }} + <!--<a href="{{ url_for('show_trait_page', + trait_id = marker.name, + dataset = dataset.name + )}}"> + {{ marker.name }} + </a>--> + </td> </tr> {% endif %} {% endfor %} |