Add extra image check for put_image_checksum

This commit is contained in:
Joseph Schorr 2014-10-17 17:57:10 -04:00
parent a19035f3b3
commit 5e74edc116

View file

@ -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')