Reverse the order of get_parent_images

This commit is contained in:
Jake Moshenko 2015-11-06 17:47:08 -05:00
parent 8723fc4def
commit 4314882fa0
4 changed files with 8 additions and 8 deletions

View file

@ -390,7 +390,7 @@ def get_image_ancestry(namespace, repository, image_id, headers):
parents = model.image.get_parent_images(namespace, repository, image)
ancestry_docker_ids = [image.docker_image_id]
ancestry_docker_ids.extend([parent.docker_image_id for parent in reversed(parents)])
ancestry_docker_ids.extend([parent.docker_image_id for parent in parents])
# We can not use jsonify here because we are returning a list not an object
response = make_response(json.dumps(ancestry_docker_ids), 200)
@ -510,7 +510,7 @@ def process_image_changes(namespace, repository, image_id):
parent_trie_path = None
if parents:
parent_trie_path, parent_locations = process_image_changes(namespace, repository,
parents[-1].docker_image_id)
parents[0].docker_image_id)
# Read in the collapsed layer state of the filesystem for the parent
parent_trie = changes.empty_fs()