From bf1c2ec1b16b50f419a349a54031baf85fcd4abd Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 17 Jan 2024 05:38:29 +0300 Subject: UI: Initialise summary page. --- qc_app/db/species.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'qc_app/db/species.py') diff --git a/qc_app/db/species.py b/qc_app/db/species.py index 7006d15..653e59b 100644 --- a/qc_app/db/species.py +++ b/qc_app/db/species.py @@ -6,8 +6,8 @@ def species(conn: mdb.Connection) -> tuple: "Retrieve the species from the database." with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute( - "SELECT SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName " - "FROM Species") + "SELECT SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName, " + "FullName FROM Species") return tuple(cursor.fetchall()) return tuple() @@ -16,9 +16,7 @@ def species_by_id(conn: mdb.Connection, speciesid) -> dict: "Retrieve the species from the database by id." with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute( - ( - "SELECT " - "SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName " - "FROM Species WHERE SpeciesId=%s"), + "SELECT SpeciesId, SpeciesName, LOWER(Name) AS Name, MenuName, " + "FullName FROM Species WHERE SpeciesId=%s", (speciesid,)) return cursor.fetchone() -- cgit v1.2.3