Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 3e4c251

Browse files
author
shin-
committed
Only check parent access if there is a parent
1 parent 0a4f90f commit 3e4c251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker_registry/images.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def put_image_json(image_id):
403403
parent_id = data.get('parent')
404404
if parent_id and not store.exists(store.image_json_path(data['parent'])):
405405
return toolkit.api_error('Image depends on a non existing parent')
406-
elif not toolkit.validate_parent_access(parent_id):
406+
elif parent_id and not toolkit.validate_parent_access(parent_id):
407407
return toolkit.api_error('Image depends on an unauthorized parent')
408408
json_path = store.image_json_path(image_id)
409409
mark_path = store.image_mark_path(image_id)

0 commit comments

Comments
 (0)