aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorzsloan2020-10-08 15:32:18 -0500
committerzsloan2020-10-08 15:32:18 -0500
commit217f527e873d5197c7efcaec627e1df5afadefa4 (patch)
tree81c07fa8db94cc477a4f021253cdaf8d8dc83ad2 /wqflask/base/data_set.py
parent5880b399efbc0175e726be5a61945c30a5fe6260 (diff)
downloadgenenetwork2-217f527e873d5197c7efcaec627e1df5afadefa4.tar.gz
Fixed issue where new phenotype groups wouldn't be saved to the self.datasets property because the group name was used as the key (instead of the group name + "Publish", which is the full dataset name for phenotypes)
* wqflask/base/data_set.py - Set "group_name" as a separate variable from "name" to avoid it being used as the key in self.datasets
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r--wqflask/base/data_set.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index e0ef559c..aeafc027 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -150,10 +150,11 @@ 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())):
+ if bool(len(g.db.execute(sql_query_mapping[t].format(group_name)).fetchone())):
self.datasets[name] = dataset_name_mapping[t]
self.redis_instance.set("dataset_structure", json.dumps(self.datasets))
return True