aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2021-08-02 21:24:39 +0300
committerBonfaceKilz2021-08-03 15:49:50 +0300
commit79d6dc5ac4610ea50e61bca80598b87d42911490 (patch)
tree69436b6a07561872af7d1ae274d11ace146b6b0e
parentf175c8806b4fbf372cbe65790ce7816b98e32695 (diff)
downloadgenenetwork2-79d6dc5ac4610ea50e61bca80598b87d42911490.tar.gz
wqflask: views: Add dataset_id to diff json that'll be stored
-rw-r--r--wqflask/wqflask/views.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index ed5398a2..11e1bfaa 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -593,10 +593,13 @@ def update_phenotype():
f"{phenotype_id}.{current_time}.json")
with open(diff_output, "w") as f:
dict_ = json.loads(r.get("output"))
- dict_.update({"author": author.decode('utf-8')})
- dict_.update({"publishdata_id": publishdata_id})
- dict_.update({"timestamp": datetime.datetime.now().strftime(
- "%Y-%m-%d %H:%M:%S")})
+ dict_.update({
+ "author": author.decode('utf-8'),
+ "publishdata_id": publishdata_id,
+ "dataset_id": data_.get("dataset-name"),
+ "timestamp": datetime.datetime.now().strftime(
+ "%Y-%m-%d %H:%M:%S")
+ })
f.write(json.dumps(dict_))
flash("Sample-data has been successfully uploaded", "success")
# Run updates: