From 75f917f592ccacfe2f2092430d63c442bbcf0a56 Mon Sep 17 00:00:00 2001
From: Jake Moshenko <jake.moshenko@coreos.com>
Date: Fri, 6 Nov 2015 16:08:14 -0500
Subject: [PATCH] Stop reading the v1 checksums from storage

---
 endpoints/v1/registry.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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: