Make sure to sort the images for the squashed image system

This commit is contained in:
Joseph Schorr 2014-11-13 15:13:44 -05:00
parent 6e47ec2ef1
commit 3e550b4b71

View file

@ -27,7 +27,9 @@ def _open_stream(namespace, repository, tag, synthetic_image_id, image_json, ima
# For performance reasons, we load the full image list here, cache it, then disconnect from
# the database.
with database.UseThenDisconnect(app.config):
image_list = model.get_matching_repository_images(namespace, repository, image_id_list)
image_list = list(model.get_matching_repository_images(namespace, repository, image_id_list))
image_list.sort(key=lambda image: image_id_list.index(image.docker_image_id))
def get_next_image():
for current_image in image_list: