Add image ancestry and update the test db accordingly.
This commit is contained in:
parent
abdf731f7a
commit
ea6df2b725
5 changed files with 43 additions and 14 deletions
|
@ -290,8 +290,14 @@ def put_image_json(namespace, repository, image_id):
|
|||
# If we reach that point, it means that this is a new image or a retry
|
||||
# on a failed push
|
||||
# save the metadata
|
||||
if parent_id:
|
||||
parent_obj = model.get_image_by_id(parent_id)
|
||||
else:
|
||||
parent_obj = None
|
||||
|
||||
model.set_image_metadata(image_id, namespace, repository,
|
||||
data.get('created'), data.get('comment'))
|
||||
data.get('created'), data.get('comment'),
|
||||
parent_obj)
|
||||
store.put_content(mark_path, 'true')
|
||||
store.put_content(json_path, request.data)
|
||||
generate_ancestry(namespace, repository, image_id, parent_id)
|
||||
|
|
Reference in a new issue