aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/dbinsert.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/qc_app/dbinsert.py b/qc_app/dbinsert.py
index f36651f..150127d 100644
--- a/qc_app/dbinsert.py
+++ b/qc_app/dbinsert.py
@@ -171,6 +171,10 @@ def create_study():
"ShortName, CreateTime, InbredSetId) "
"VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s)")
cursor.execute(query, values)
+ lastrowid = cursor.lastrowid
+ cursor.execute(
+ "UPDATE ProbeFreeze SET ProbeFreezeId=%s WHERE Id=%s",
+ (lastrowid, lastrowid))
flash("Study created successfully", "alert-success")
return render_template(
"continue_from_create_study.html",
@@ -294,7 +298,7 @@ def study_by_id(studyid:int) -> Union[dict, None]:
with database_connection() as conn:
with conn.cursor(cursorclass=DictCursor) as cursor:
cursor.execute(
- "SELECT * FROM ProbeFreeze WHERE ProbeFreezeId=%s",
+ "SELECT * FROM ProbeFreeze WHERE Id=%s",
(studyid,))
return cursor.fetchone()