Last active
July 20, 2021 16:44
-
-
Save ipanova/bd5821b55a1e01245fe7556dc3791ddd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/pulp_container/app/registry.py b/pulp_container/app/registry.py | |
index 5b8d8cc..77cacdc 100644 | |
--- a/pulp_container/app/registry.py | |
+++ b/pulp_container/app/registry.py | |
@@ -140,7 +140,14 @@ class Registry(Handler): | |
"Content-Type": return_media_type, | |
"Docker-Content-Digest": tag.tagged_manifest.digest, | |
} | |
- return await Registry.dispatch_tag(tag, response_headers) | |
+ | |
+ try: | |
+ artifact = tag.tagged_manifest._artifacts.get() | |
+ except ObjectDoesNotExist: | |
+ ca = tag.tagged_manifest.contentartifact_set.all()[0] | |
+ return await self._stream_content_artifact(request, web.StreamResponse(), ca) | |
+ else: | |
+ return await Registry._dispatch(artifact.file, response_headers) | |
# convert if necessary | |
return await Registry.dispatch_converted_schema(tag, accepted_media_types, path) | |
[ipanova@fluffy pulp_container]$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment