From c352050b07f77595a3899131aa56d4c03a269ce5 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 19 Nov 2015 16:43:35 -0500 Subject: [PATCH] For the last time, you can't delete with a subquery on the same table! --- data/model/tag.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/model/tag.py b/data/model/tag.py index 0570f831a..f533e9a08 100644 --- a/data/model/tag.py +++ b/data/model/tag.py @@ -143,10 +143,10 @@ def garbage_collect_tags(repo): if len(tags_to_delete) > 0: with db_transaction(): - manifests_to_delete = (TagManifest - .select(TagManifest.id) - .join(RepositoryTag) - .where(RepositoryTag.id << tags_to_delete)) + manifests_to_delete = list(TagManifest + .select(TagManifest.id) + .join(RepositoryTag) + .where(RepositoryTag.id << tags_to_delete)) num_deleted_manifests = (TagManifest .delete()