Migrate data back to Image in preparation for v2
This commit is contained in:
parent
abb1486a96
commit
b56de3355c
7 changed files with 72 additions and 6 deletions
|
@ -456,7 +456,8 @@ def put_image_json(namespace, repository, image_id):
|
|||
|
||||
logger.debug('Parsing image JSON')
|
||||
try:
|
||||
data = json.loads(request.data.decode('utf8'))
|
||||
v1_metadata = request.data
|
||||
data = json.loads(v1_metadata.decode('utf8'))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
|
@ -530,7 +531,7 @@ def put_image_json(namespace, repository, image_id):
|
|||
|
||||
logger.debug('Setting image metadata')
|
||||
model.image.set_image_metadata(image_id, namespace, repository, data.get('created'),
|
||||
data.get('comment'), command, parent_image)
|
||||
data.get('comment'), command, v1_metadata, parent_image)
|
||||
|
||||
logger.debug('Putting json path')
|
||||
store.put_content(repo_image.storage.locations, json_path, request.data)
|
||||
|
|
Reference in a new issue