From ce7e3a8733037a38fbb4e84cca76c98e57768a88 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Fri, 29 Aug 2014 13:16:32 -0400 Subject: [PATCH] Do not link against layers that are still marked as uploading, there is no guarantee that they will ever be completed and their ancestry may be incomplete. --- data/model/legacy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/model/legacy.py b/data/model/legacy.py index cc32b8979..52723bd11 100644 --- a/data/model/legacy.py +++ b/data/model/legacy.py @@ -1037,7 +1037,8 @@ def find_create_or_link_image(docker_image_id, repository, username, translation .join(Repository) .join(Visibility) .switch(Repository) - .join(RepositoryPermission, JOIN_LEFT_OUTER)) + .join(RepositoryPermission, JOIN_LEFT_OUTER) + .where(ImageStorage.uploading == False)) query = (_filter_to_repos_for_user(query, username) .where(Image.docker_image_id == docker_image_id))