Fix deleting repos and images under MySQL
MySQL doesn't handle constraints at the end of transactions, so deleting images currently fails. This removes the constraint and just leaves parent_id as an int
This commit is contained in:
parent
daa74b5132
commit
2d2662f53f
6 changed files with 9 additions and 10 deletions
|
@ -303,7 +303,7 @@ def set_image_metadata(docker_image_id, namespace_name, repository_name, created
|
|||
|
||||
if parent:
|
||||
fetched.ancestors = '%s%s/' % (parent.ancestors, parent.id)
|
||||
fetched.parent = parent
|
||||
fetched.parent_id = parent.id
|
||||
|
||||
fetched.save()
|
||||
fetched.storage.save()
|
||||
|
|
Reference in a new issue