aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uploader/phenotypes/models.py11
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())