From b565f67f8fd9895ecb50a2b40e330380b146e3c6 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 2 Jul 2025 13:29:34 -0500 Subject: Update descriptions and abbreviations - Add the description to both the Original and Post-Publication fields. - Set the abbreviation fields to the identifier in the files. --- uploader/phenotypes/models.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'uploader/phenotypes/models.py') diff --git a/uploader/phenotypes/models.py b/uploader/phenotypes/models.py index c2aeebf..45fcd30 100644 --- a/uploader/phenotypes/models.py +++ b/uploader/phenotypes/models.py @@ -314,9 +314,13 @@ def create_new_phenotypes(conn: mdb.Connection, cursor.executemany( ("INSERT INTO " - "Phenotype(Pre_publication_description, Original_description, Units, Authorized_Users) " - "VALUES (%s, %s, %s, 'robwilliams')"), - tuple((row["id"], row["description"], row["units"]) + "Phenotype(" + "Pre_publication_description, Post_publication_description, " + "Original_description, Units, Pre_publication_abbreviation, " + "Post_publication_abbreviation, Authorized_Users" + ")" + "VALUES (%s, %s, %s, %s, %s, %s, 'robwilliams')"), + tuple((row["id"], row["description"], row["description"], row["units"], row["id"], row["id"]) for row in batch)) paramstr = ", ".join(["%s"] * len(batch)) cursor.execute( -- cgit v1.2.3