Skip to content

Commit

Permalink
Fixed upload does not exist error during image push operation.
Browse files Browse the repository at this point in the history
closes #861

(cherry picked from commit e618492)
  • Loading branch information
ipanova authored and patchback[bot] committed Jun 24, 2022
1 parent 657d908 commit e9fe77d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/861.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed upload does not exist error during image push operation.
2 changes: 1 addition & 1 deletion pulp_container/app/registry_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ def put(self, request, path, pk=None):
# Upload has been deleted => task has started or even finished
task = Task.objects.filter(
name__endswith="add_and_remove",
reserved_resources_record=[f"upload:{pk}"],
reserved_resources_record__contains=[f"shared:upload:{pk}"],
).last()
if not task:
# No upload and no task for it => the upload probably never existed
Expand Down

0 comments on commit e9fe77d

Please sign in to comment.