diff --git a/glance/api/v1/images.py b/glance/api/v1/images.py index 9bedf20..2684454 100644 --- a/glance/api/v1/images.py +++ b/glance/api/v1/images.py @@ -738,10 +738,10 @@ class Controller(controller.BaseController): # to delete the image if the backend doesn't yet store it. # See https://bugs.launchpad.net/glance/+bug/747799 try: + registry.delete_image_metadata(req.context, id) if image['location']: schedule_delete_from_backend(image['location'], self.conf, req.context, id) - registry.delete_image_metadata(req.context, id) except exception.NotFound, e: msg = ("Failed to find image to delete: %(e)s" % locals()) for line in msg.split('\n'):