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.

This commit is contained in:
Jake Moshenko 2014-08-29 13:16:32 -04:00
parent 6750e0c3f6
commit ce7e3a8733

View file

@ -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))