Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ 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