From c8c1bf3049858948b76640a4fbabd49ee53198f0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 16 Apr 2024 11:20:06 +0300 Subject: 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. --- qc_app/db/datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qc_app') 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] -- cgit v1.2.3