Fix issue with query when manifest count is 0
This commit is contained in:
parent
d8f395447e
commit
4981ccbc4e
1 changed files with 6 additions and 4 deletions
|
@ -148,10 +148,12 @@ def garbage_collect_tags(repo):
|
|||
.join(RepositoryTag)
|
||||
.where(RepositoryTag.id << tags_to_delete))
|
||||
|
||||
num_deleted_manifests = (TagManifest
|
||||
.delete()
|
||||
.where(TagManifest.id << manifests_to_delete)
|
||||
.execute())
|
||||
num_deleted_manifests = 0
|
||||
if len(manifests_to_delete) > 0:
|
||||
num_deleted_manifests = (TagManifest
|
||||
.delete()
|
||||
.where(TagManifest.id << manifests_to_delete)
|
||||
.execute())
|
||||
|
||||
num_deleted_tags = (RepositoryTag
|
||||
.delete()
|
||||
|
|
Reference in a new issue