Fixes incorrect processing of deleting metadata

When a non-admin tries to delete metadata from a marked image,
they are correctly getting an error message, however they are
also getting a success message when they shouldn't. This code
fixes the incorrect success message.

Closes-Bug: #1308519
Change-Id: I909551365b4a92675d26c1da754e586685a4aa32
This commit is contained in:
Ryan Peters 2014-04-23 10:18:12 -05:00
parent 3269374769
commit 3a487a8367
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ class RemoveImageMetadata(tables.DeleteAction):
try:
glance.image_update(request, obj_id, properties={})
except Exception:
exceptions.handle(request, _('Unable to remove metadata'))
exceptions.handle(request, _('Unable to remove metadata'),
redirect='horizon:murano:images:index')
class MarkedImagesTable(tables.DataTable):