aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-16 11:20:06 +0300
committerFrederick Muriuki Muriithi2024-04-16 11:24:39 +0300
commitc8c1bf3049858948b76640a4fbabd49ee53198f0 (patch)
treeafeab029e0d4be02953d87f5987225ffceccd65b
parente731a9c655722dc863141216019ed6f9b9fbef3c (diff)
downloadgn-uploader-c8c1bf3049858948b76640a4fbabd49ee53198f0.tar.gz
bug: Set ProbeFreezeId for only new row!
Previously the extra ProbeFreezeId column was being updated for *ALL* rows, rather than just the newly inserted row, which is a bug. This commit fixes that.
-rw-r--r--qc_app/db/datasets.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qc_app/db/datasets.py b/qc_app/db/datasets.py
index bf5ac25..767ec41 100644
--- a/qc_app/db/datasets.py
+++ b/qc_app/db/datasets.py
@@ -83,8 +83,8 @@ def probeset_create_study(conn: mdb.Connection,#pylint: disable=[too-many-argume
""",
studydata)
studyid = cursor.lastrowid
- cursor.execute("UPDATE ProbeFreeze SET ProbeFreezeId=%s",
- (studyid,))
+ cursor.execute("UPDATE ProbeFreeze SET ProbeFreezeId=%s WHERE Id=%s",
+ (studyid, studyid))
return {**studydata, "studyid": studyid}
def probeset_create_dataset(conn: mdb.Connection,#pylint: disable=[too-many-arguments]