Revert "Merge pull request #682 from jzelinskie/revertrevert"

This reverts commit 627ad25c9c, reversing
changes made to 31c392fecc.
This commit is contained in:
Jimmy Zelinskie 2015-10-22 16:02:07 -04:00
parent 24b7064140
commit 278bc736e3
10 changed files with 65 additions and 212 deletions

View file

@ -12,7 +12,11 @@ from util.cache import cache_control_flask_restful
def image_view(image, image_map, include_ancestors=True):
command = image.command
extended_props = image
if image.storage and image.storage.id:
extended_props = image.storage
command = extended_props.command
def docker_id(aid):
if not aid or not aid in image_map:
@ -22,10 +26,10 @@ def image_view(image, image_map, include_ancestors=True):
image_data = {
'id': image.docker_image_id,
'created': format_date(image.created),
'comment': image.comment,
'created': format_date(extended_props.created),
'comment': extended_props.comment,
'command': json.loads(command) if command else None,
'size': image.storage.image_size,
'size': extended_props.image_size,
'uploading': image.storage.uploading,
'sort_index': len(image.ancestors),
}