Fix bugs with pushing, pulling, and deleting.
This commit is contained in:
parent
bf98575feb
commit
bf0e01fba5
3 changed files with 16 additions and 15 deletions
|
@ -388,12 +388,13 @@ def put_image_json(namespace, repository, image_id):
|
|||
parent_image = model.get_repo_image(namespace, repository, parent_id)
|
||||
|
||||
parent_uuid = parent_image and parent_image.storage.uuid
|
||||
parent_locations = parent_image and parent_image.storage.locations
|
||||
|
||||
if parent_id:
|
||||
profile.debug('Looking up parent image data')
|
||||
|
||||
if (parent_id and not
|
||||
store.exists(parent_image.storage.locations, store.image_json_path(parent_uuid))):
|
||||
store.exists(parent_locations, store.image_json_path(parent_uuid))):
|
||||
abort(400, 'Image %(image_id)s depends on non existing parent image %(parent_id)s',
|
||||
issue='invalid-request', image_id=image_id, parent_id=parent_id)
|
||||
|
||||
|
@ -428,7 +429,7 @@ def put_image_json(namespace, repository, image_id):
|
|||
|
||||
profile.debug('Generating image ancestry')
|
||||
generate_ancestry(image_id, uuid, repo_image.storage.locations, parent_id, parent_uuid,
|
||||
parent_image.storage.locations)
|
||||
parent_locations)
|
||||
|
||||
profile.debug('Done')
|
||||
return make_response('true', 200)
|
||||
|
|
Reference in a new issue