From 3d31c64da201cf75fa5eb7e64a6fd28c42097075 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 9 Feb 2015 16:45:06 -0500 Subject: [PATCH] Make sure to select the latest image in the repository with the matching comment --- data/model/legacy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/data/model/legacy.py b/data/model/legacy.py index 12220d168..ff1a5ba59 100644 --- a/data/model/legacy.py +++ b/data/model/legacy.py @@ -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