aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/db/populations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/qc_app/db/populations.py b/qc_app/db/populations.py
index 0bcbe5d..06ae773 100644
--- a/qc_app/db/populations.py
+++ b/qc_app/db/populations.py
@@ -28,7 +28,7 @@ def populations_by_species(conn: mdb.Connection, speciesid) -> tuple:
def save_population(conn: mdb.Connection, population_details: dict) -> dict:
"""Save the population details to the db."""
- with conn.cursor() as cursor:
+ with conn.cursor(cursorclass=DictCursor) as cursor:
cursor.execute("SELECT MAX(Id) AS last_id FROM InbredSet")
new_id = cursor.fetchone()["last_id"] + 1
cursor.execute(