diff --git a/endpoints/registry.py b/endpoints/registry.py index 5699f0db2..2327ffde6 100644 --- a/endpoints/registry.py +++ b/endpoints/registry.py @@ -278,6 +278,9 @@ def put_image_checksum(namespace, repository, image_id): profile.debug('Looking up repo image') repo_image = model.get_repo_image(namespace, repository, image_id) + if not repo_image or not repo_image.storage: + abort(404, 'Image not found: %(image_id)s', issue='unknown-image', image_id=image_id) + uuid = repo_image.storage.uuid profile.debug('Looking up repo layer data')