From 1247923fd196c98779edc5ef8cdeb31ab7ceef16 Mon Sep 17 00:00:00 2001 From: Ina Panova Date: Tue, 21 Jun 2022 13:38:19 +0200 Subject: [PATCH] Fixed upload does not exist error during image push operation. closes #861 (cherry picked from commit e61849214b488fb32c293904503f804f0d0d7843) --- CHANGES/861.bugfix | 1 + pulp_container/app/registry_api.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGES/861.bugfix diff --git a/CHANGES/861.bugfix b/CHANGES/861.bugfix new file mode 100644 index 000000000..d94977b9e --- /dev/null +++ b/CHANGES/861.bugfix @@ -0,0 +1 @@ +Fixed upload does not exist error during image push operation. diff --git a/pulp_container/app/registry_api.py b/pulp_container/app/registry_api.py index a0383b5e1..979976e6e 100644 --- a/pulp_container/app/registry_api.py +++ b/pulp_container/app/registry_api.py @@ -680,7 +680,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