diff --git a/data/migrations/versions/2827d36939e4_separate_v1_and_v2_checksums.py b/data/migrations/versions/2827d36939e4_separate_v1_and_v2_checksums.py index 4e161daed..f3ee69d0e 100644 --- a/data/migrations/versions/2827d36939e4_separate_v1_and_v2_checksums.py +++ b/data/migrations/versions/2827d36939e4_separate_v1_and_v2_checksums.py @@ -8,7 +8,7 @@ Create Date: 2015-11-04 16:29:48.905775 # revision identifiers, used by Alembic. revision = '2827d36939e4' -down_revision = '73669db7e12' +down_revision = '5cdc2d819c5' from alembic import op import sqlalchemy as sa diff --git a/data/migrations/versions/57dad559ff2d_add_support_for_quay_s_security_indexer.py b/data/migrations/versions/57dad559ff2d_add_support_for_quay_s_security_indexer.py index 7cd0f84c4..ed317f327 100644 --- a/data/migrations/versions/57dad559ff2d_add_support_for_quay_s_security_indexer.py +++ b/data/migrations/versions/57dad559ff2d_add_support_for_quay_s_security_indexer.py @@ -6,7 +6,7 @@ Create Date: 2015-07-13 16:51:41.669249 # revision identifiers, used by Alembic. revision = '57dad559ff2d' -down_revision = '35f538da62' +down_revision = '73669db7e12' from alembic import op import sqlalchemy as sa diff --git a/endpoints/v1/registry.py b/endpoints/v1/registry.py index 19915363c..72f8843f5 100644 --- a/endpoints/v1/registry.py +++ b/endpoints/v1/registry.py @@ -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: diff --git a/test/data/test.db b/test/data/test.db index ab3922d08..a301a7fa7 100644 Binary files a/test/data/test.db and b/test/data/test.db differ