Fix a bug where images can't be pushed that would remove a dependency image.

This commit is contained in:
yackob03 2013-10-15 16:13:10 -04:00
parent 1af0cb3341
commit 984e14f9c5

View file

@ -126,7 +126,9 @@ def create_repository(namespace, repository):
if existing.docker_image_id in new_repo_images:
added_images.pop(existing.docker_image_id)
else:
existing.repositoryimage.delete()
logger.debug('Deleting existing image with id: %s' %
existing.docker_image_id)
existing.delete_instance()
for image_description in added_images.values():
image = model.create_image(image_description['id'], repo)