diff --git a/django-openstack/django_openstack/dash/views/images.py b/django-openstack/django_openstack/dash/views/images.py index ccac7cf413..7406328dbc 100644 --- a/django-openstack/django_openstack/dash/views/images.py +++ b/django-openstack/django_openstack/dash/views/images.py @@ -68,7 +68,7 @@ class UpdateImageForm(forms.SelfHandlingForm): LOG.exception(error_retrieving) messages.error(request, error_retrieving) - if image.owner == request.user.username: + if image.owner == request.user.tenant_id: try: meta = { 'is_public': True, @@ -185,7 +185,7 @@ class DeleteImage(forms.SelfHandlingForm): tenant_id = request.user.tenant_id try: image = api.image_get(request, image_id) - if image.owner == request.user.username: + if image.owner == request.user.tenant_id: api.image_delete(request, image_id) else: messages.info(request, "Unable to delete image, you are not \ diff --git a/django-openstack/django_openstack/templates/django_openstack/dash/images/_list.html b/django-openstack/django_openstack/templates/django_openstack/dash/images/_list.html index 5e4b25f6a9..c89db56602 100644 --- a/django-openstack/django_openstack/templates/django_openstack/dash/images/_list.html +++ b/django-openstack/django_openstack/templates/django_openstack/dash/images/_list.html @@ -16,7 +16,7 @@ {{image.status|capfirst}}