aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-10-18 12:05:17 +0300
committerFrederick Muriuki Muriithi2023-10-18 12:05:17 +0300
commit5bd8b593ff1136bd76b8dc132a39d9ed3458b187 (patch)
tree306ee90ca4e77366ac8e2818030863100b0ee756 /qc_app
parent1d3f877aadcf89f82746e4dccc8d8cf767928419 (diff)
downloadgn-uploader-5bd8b593ff1136bd76b8dc132a39d9ed3458b187.tar.gz
Explicitly specify columns
Due to possible schema differences between local small db on development computer and those on CI/CD and Production, explicitly specify the columns being operated on by the queries.
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/dbinsert.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/qc_app/dbinsert.py b/qc_app/dbinsert.py
index e9dc3ff..df9a9fd 100644
--- a/qc_app/dbinsert.py
+++ b/qc_app/dbinsert.py
@@ -193,7 +193,9 @@ def create_study():
datetime.now().date().strftime("%Y-%m-%d"),
form["inbredsetid"])
query = (
- "INSERT INTO ProbeFreeze() "
+ "INSERT INTO ProbeFreeze("
+ "Id, ProbeFreezeId, ChipId, TissueId, Name, FullName, "
+ "ShortName, CreateTime, InbredSetId) "
"VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s)")
cursor.execute(query, values)
flash("Study created successfully", "alert-success")
@@ -291,7 +293,11 @@ def create_dataset():
form["datasetpublic"], form["datasetconfidentiality"],
form["datasetdatascale"])
query = (
- "INSERT INTO ProbeSetFreeze VALUES"
+ "INSERT INTO ProbeSetFreeze("
+ "Id, ProbeFreezeId, AvgID, Name, Name2, FullName, "
+ "ShortName, CreateTime, OrderList, public, "
+ "confidentiality, AuthorisedUsers, DataScale) "
+ "VALUES"
"(%s, %s, %s, %s, %s, %s, %s, %s, NULL, %s, %s, NULL, %s)")
cursor.execute(query, values)
return render_template(