aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2015-10-23 16:39:40 +0000
committerzsloan2015-10-23 16:39:40 +0000
commit72f7f223d362311a25d7ffce4c4c17e192c9f5fd (patch)
treef22c7148ac55c844f1fe669aeb592e3ba3d03588 /wqflask
parentb90e568e51b38f8f9beb24f3adfd79e16d056585 (diff)
downloadgenenetwork2-72f7f223d362311a25d7ffce4c4c17e192c9f5fd.tar.gz
Fixed error if you click search after entering white spaces; Ethan's fix only worked when the user hits enter
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/wqflask/search_results.py26
-rwxr-xr-xwqflask/wqflask/templates/marker_regression.html10
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 %}