Skip to content

Commit 54e76c0

Browse files
committed
fix #3436
1 parent 2fb9abc commit 54e76c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

qiita_db/metadata_template/prep_template.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ def delete(cls, id_):
272272
"Cannot remove prep template %d because it has an artifact"
273273
" associated with it" % id_)
274274

275+
# artifacts that are archived are not returned as part of the code
276+
# above and we need to clean them before moving forward
277+
for aa in self.archived_artifacts():
278+
qdb.artifact.Artifact.delete(aa.id)
279+
275280
# Delete the prep template filepaths
276281
sql = """DELETE FROM qiita.prep_template_filepath
277282
WHERE prep_template_id = %s"""

0 commit comments

Comments
 (0)