Optimize get_tag_image query

No caller uses the image placements or locations, so no need to load them.
This commit is contained in:
Joseph Schorr 2016-06-02 16:36:38 -04:00
parent 338f93c3c8
commit 53538f9001
4 changed files with 45 additions and 25 deletions

View file

@ -98,7 +98,7 @@ class RepositoryTag(RepositoryParamResource):
original_image_id = None
try:
original_tag_image = model.tag.get_tag_image(namespace, repository, tag)
original_tag_image = model.tag.get_repo_tag_image(image.repository, tag)
if original_tag_image:
original_image_id = original_tag_image.docker_image_id
except model.DataModelException: