aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-11-12 01:12:06 -0600
committerGitHub2021-11-12 01:12:06 -0600
commitc1fcc555741aa685413e14fa8a17bb10fa1934c2 (patch)
treec7a90037f16411e2868477a6434d4f01bf4b4238 /wqflask
parent166bca11dee1a09d346c4bd72edbf51832f13820 (diff)
parentd6398ea7db0072694b0d8f79d909c276fae75bdd (diff)
downloadgenenetwork2-c1fcc555741aa685413e14fa8a17bb10fa1934c2.tar.gz
Merge pull request #625 from zsloan/bug/too_many_results_search_error
Bug/too many results search error
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/search_results.py4
-rw-r--r--wqflask/wqflask/templates/search_result_page.html2
2 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 5ca1f9ca..33f9319c 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -62,8 +62,10 @@ class SearchResultPage:
self.search_term_exists = True
self.results = []
+ max_result_count = 100000 # max number of results to display
type = kw.get('type')
if type == "Phenotypes": # split datatype on type field
+ max_result_count = 50000
dataset_type = "Publish"
elif type == "Genotypes":
dataset_type = "Geno"
@@ -81,7 +83,7 @@ class SearchResultPage:
self.too_many_results = False
if self.search_term_exists:
- if len(self.results) > 50000:
+ if len(self.results) > max_result_count:
self.trait_list = []
self.too_many_results = True
else:
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 95842316..dade6ba5 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -176,7 +176,7 @@
return params;
};
- {% if results|count > 0 %}
+ {% if results|count > 0 and not too_many_results %}
var tableId = "trait_table";
var width_change = 0; //ZS: For storing the change in width so overall table width can be adjusted by that amount