aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn3/db/sample_data.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/gn3/db/sample_data.py b/gn3/db/sample_data.py
index 3d2faca..80f8292 100644
--- a/gn3/db/sample_data.py
+++ b/gn3/db/sample_data.py
@@ -197,13 +197,12 @@ def delete_sample_data(conn: Any,
if value != "x":
with conn.cursor() as cursor:
cursor.execute(
- ("DELETE FROM CaseAttributeXRefNew "
- "WHERE StrainId = "
- "(SELECT CaseAttributeId FROM "
- f"CaseAttribute WHERE NAME = %s) "
- "AND InbredSetId = %s"),
- (strain_id, case_attr, inbredset_id)
- )
+ "DELETE FROM CaseAttributeXRefNew "
+ "WHERE StrainId = %s AND CaseAttributeId = "
+ "(SELECT CaseAttributeId FROM "
+ "CaseAttribute WHERE Name = %s) "
+ "AND InbredSetId = %s",
+ (strain_id, case_attr, inbredset_id))
return cursor.rowcount
return 0