aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-10-08 15:44:15 -0500
committerGitHub2020-10-08 15:44:15 -0500
commit7db8f7da013eefdf518ccf024477d0abf4324c03 (patch)
tree1c606358b6d63c11633d9386e4dec0f7bb703cd9
parent5880b399efbc0175e726be5a61945c30a5fe6260 (diff)
parent3d444c29ab975e313534dd7c57747b3e79f06c26 (diff)
downloadgenenetwork2-7db8f7da013eefdf518ccf024477d0abf4324c03.tar.gz
Merge pull request #457 from zsloan/bxd_longevity_search_error_fix
Fixed issue where new phenotype groups wouldn't be saved to the self.…
-rw-r--r--wqflask/base/data_set.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index e0ef559c..2f1549ae 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -150,10 +150,12 @@ Publish or ProbeSet. E.g.
"geno": "Geno",
}
+ group_name = name
if t in ['pheno', 'other_pheno']:
- name = name.replace("Publish", "")
+ group_name = name.replace("Publish", "")
- if bool(len(g.db.execute(sql_query_mapping[t].format(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