Better error message in horizon

Change-Id: I74384e092cb02c1f7a1979e7fa7a5e555befcd97
This commit is contained in:
Memo Garcia 2017-03-10 14:36:02 +00:00
parent 4e94b1e1c0
commit dc8c12afef

View File

@ -204,10 +204,11 @@ def shield(message, redirect=''):
# To avoid an endless loop, we must not redirect to the
# same page on which the error happened
user_home = get_user_home(view.request.user)
exceptions.handle(view.request, _(message),
exceptions.handle(view.request, _(error.message),
redirect=user_home)
else:
exceptions.handle(view.request, _(message), redirect=r)
exceptions.handle(view.request, _(error.message),
redirect=r)
return wrapped_function
return wrap