diff options
author | Frederick Muriuki Muriithi | 2025-07-14 11:24:12 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-07-14 11:24:12 -0500 |
commit | 284f4b1141c9e13dfdbdf59699d73ddb3dcdf17b (patch) | |
tree | 1c42788eb7ab08ba6c0a050385d02f9c200478d2 | |
parent | 252cf92a73168cd0a3310be10ee94ff55b30f407 (diff) | |
download | gn-uploader-284f4b1141c9e13dfdbdf59699d73ddb3dcdf17b.tar.gz |
Do not enter IDs in files in the description field.
-rw-r--r-- | uploader/phenotypes/models.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/uploader/phenotypes/models.py b/uploader/phenotypes/models.py index 45fcd30..ed14993 100644 --- a/uploader/phenotypes/models.py +++ b/uploader/phenotypes/models.py @@ -320,16 +320,21 @@ def create_new_phenotypes(conn: mdb.Connection, "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"]) + tuple((row["description"], + row["description"], + row["description"], + row["units"], + row["id"], + row["id"]) for row in batch)) paramstr = ", ".join(["%s"] * len(batch)) cursor.execute( - "SELECT * FROM Phenotype WHERE Pre_publication_description IN " + "SELECT * FROM Phenotype WHERE Pre_publication_abbreviation IN " f"({paramstr})", tuple(item["id"] for item in batch)) _phenos = _phenos + tuple({ "phenotype_id": row["Id"], - "id": row["Pre_publication_description"], + "id": row["Pre_publication_abbreviation"], "description": row["Original_description"], "units": row["Units"] } for row in cursor.fetchall()) |