Stop reading the v1 checksums from storage

This commit is contained in:
Jake Moshenko 2015-11-06 16:08:14 -05:00
parent fd3f88f489
commit 75f917f592

View file

@ -278,14 +278,14 @@ def put_image_layer(namespace, repository, image_id):
except (IOError, checksums.TarError) as exc:
logger.debug('put_image_layer: Error when computing tarsum %s', exc)
if repo_image.storage.checksum is None:
if repo_image.v1_checksum is None:
# We don't have a checksum stored yet, that's fine skipping the check.
# Not removing the mark though, image is not downloadable yet.
session['checksum'] = csums
session['content_checksum'] = 'sha256:{0}'.format(ch.hexdigest())
return make_response('true', 200)
checksum = repo_image.storage.checksum
checksum = repo_image.v1_checksum
# We check if the checksums provided matches one the one we computed
if checksum not in csums: