From c8f0780aafec00c63570732cff740deec0aedf81 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Thu, 6 Feb 2014 14:49:53 -0500 Subject: [PATCH] Fix a subtle bug with create_or_update_tag. --- data/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/model.py b/data/model.py index 66cb37821..dc478b682 100644 --- a/data/model.py +++ b/data/model.py @@ -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)