Fix an NPE when trying to pull a manifest without a legacy image via V1
This commit is contained in:
parent
d9da838df1
commit
b1dd053b02
6 changed files with 68 additions and 4 deletions
|
@ -44,11 +44,11 @@ def get_tag(namespace_name, repo_name, tag):
|
|||
if repository_ref is None:
|
||||
abort(404)
|
||||
|
||||
tag = registry_model.get_repo_tag(repository_ref, tag, include_legacy_image=True)
|
||||
if tag is None:
|
||||
image_id = registry_model.get_tag_legacy_image_id(repository_ref, tag, storage)
|
||||
if image_id is None:
|
||||
abort(404)
|
||||
|
||||
resp = make_response('"%s"' % tag.legacy_image.docker_image_id)
|
||||
resp = make_response('"%s"' % image_id)
|
||||
resp.headers['Content-Type'] = 'application/json'
|
||||
return resp
|
||||
|
||||
|
|
Reference in a new issue