Skip to content

Commit 3330438

Browse files
committed
fix errors
1 parent 8fd7800 commit 3330438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiita_db/artifact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,13 +626,13 @@ def delete(cls, artifact_id):
626626

627627
# there are cases that an artifact would not be linked to a
628628
# study
629-
pt_ids = [pt.id for a in all_artifacts
629+
pt_ids = [tuple([pt.id]) for a in all_artifacts
630630
for pt in a.prep_templates]
631631
if pt_ids:
632632
sql = """UPDATE qiita.prep_template
633633
SET artifact_id = NULL
634634
WHERE prep_template_id IN %s"""
635-
qdb.sql_connection.TRN.add(sql, [tuple(x) for x in pt_ids])
635+
qdb.sql_connection.TRN.add(sql, pt_ids)
636636
else:
637637
sql = """DELETE FROM qiita.parent_artifact
638638
WHERE artifact_id IN %s"""

0 commit comments

Comments
 (0)