diff options
author | Frederick Muriuki Muriithi | 2025-07-02 13:29:34 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-07-02 13:29:34 -0500 |
commit | b565f67f8fd9895ecb50a2b40e330380b146e3c6 (patch) | |
tree | 6a5e987a913a44f5ea5b776974b9f6f9544ad4aa | |
parent | f871616aec3d89efd144e72e594fbd81cee9e75f (diff) | |
download | gn-uploader-b565f67f8fd9895ecb50a2b40e330380b146e3c6.tar.gz |
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.
-rw-r--r-- | uploader/phenotypes/models.py | 10 |
1 files changed, 7 insertions, 3 deletions
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( |