Revert "Merge pull request #491 from jakedt/migratebackp2"

This reverts commit 7ad2522dbe, reversing
changes made to a0b191ffa1.
This commit is contained in:
Silas Sewell 2015-09-28 16:09:22 -04:00
parent 7ad2522dbe
commit 9000169b53
11 changed files with 66 additions and 232 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),
}