diff --git a/endpoints/registry.py b/endpoints/registry.py index c95072e56..8fd54e19c 100644 --- a/endpoints/registry.py +++ b/endpoints/registry.py @@ -439,6 +439,10 @@ def process_image_changes(namespace, repository, image_id): logger.debug('Generating diffs for image: %s' % image_id) repo_image = model.get_repo_image(namespace, repository, image_id) + if not repo_image: + logger.warning('No image for id: %s', image_id) + return None, None + uuid = repo_image.storage.uuid image_diffs_path = store.image_file_diffs_path(uuid) @@ -446,7 +450,7 @@ def process_image_changes(namespace, repository, image_id): if store.exists(repo_image.storage.locations, image_diffs_path): logger.debug('Diffs already exist for image: %s' % image_id) - return image_trie_path + return image_trie_path, repo_image.storage.locations image = model.get_image_by_id(namespace, repository, image_id) parents = model.get_parent_images(namespace, repository, image)