Make sure to select the latest image in the repository with the matching comment

This commit is contained in:
Joseph Schorr 2015-02-09 16:45:06 -05:00
parent 9f1ec9d47d
commit 3d31c64da2

View file

@ -1110,6 +1110,7 @@ def find_child_image(repo, parent_image, command):
.switch(Image)
.where(Image.ancestors % '%/' + parent_image.id + '/%',
ImageStorage.command == command)
.order_by(ImageStorage.created.desc())
.get())
except Image.DoesNotExist:
return None