Revert "Merge pull request #557 from coreos-inc/revert-migration"

This reverts commit c4f938898a, reversing
changes made to 7ad2522dbe.
This commit is contained in:
Jimmy Zelinskie 2015-10-21 15:29:57 -04:00
parent 5c063bd285
commit 39cfe77d42
11 changed files with 232 additions and 65 deletions

View file

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