aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorzsloan2020-10-08 15:40:18 -0500
committerzsloan2020-10-08 15:40:18 -0500
commit3d444c29ab975e313534dd7c57747b3e79f06c26 (patch)
tree1c606358b6d63c11633d9386e4dec0f7bb703cd9 /wqflask/base/data_set.py
parent217f527e873d5197c7efcaec627e1df5afadefa4 (diff)
downloadgenenetwork2-3d444c29ab975e313534dd7c57747b3e79f06c26.tar.gz
Fixed remaining issue that applies to all dataset types
* wqflask/base/data_set.py - Fixed issue where there was an error when trying to take the len of the query results when there were no results
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r--wqflask/base/data_set.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index aeafc027..2f1549ae 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -154,7 +154,8 @@ Publish or ProbeSet. E.g.
if t in ['pheno', 'other_pheno']:
group_name = name.replace("Publish", "")
- if bool(len(g.db.execute(sql_query_mapping[t].format(group_name)).fetchone())):
+ results = g.db.execute(sql_query_mapping[t].format(group_name)).fetchone()
+ if results:
self.datasets[name] = dataset_name_mapping[t]
self.redis_instance.set("dataset_structure", json.dumps(self.datasets))
return True