Fix a subtle bug with create_or_update_tag.

This commit is contained in:
yackob03 2014-02-06 14:49:53 -05:00
parent ec8f599a11
commit c8f0780aaf

View file

@ -1059,7 +1059,8 @@ def create_or_update_tag(namespace_name, repository_name, tag_name,
(namespace_name, repository_name))
try:
image = Image.get(Image.docker_image_id == tag_docker_image_id)
image = Image.get(Image.docker_image_id == tag_docker_image_id,
Image.repository == repo)
except Image.DoesNotExist:
raise DataModelException('Invalid image with id: %s' %
tag_docker_image_id)