From b3bf782035f31856d3064b90100ae517e8415d84 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Mon, 30 Jun 2014 13:51:42 -0400 Subject: [PATCH] Fix the diffs worker. --- endpoints/registry.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)