Merge pull request #930 from jakedt/fixgcagain

For the last time, you can't delete with a subquery on the same table!
This commit is contained in:
Jake Moshenko 2015-11-19 16:47:37 -05:00
commit d8f395447e

View file

@ -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()