admin: Use error message from UserCreationError when updating a user.
If we get a UserCreationError on updating a user we should display the more specific error message from the exception.
This commit is contained in:
parent
23ac9de853
commit
b23f4f5b5d
1 changed files with 2 additions and 0 deletions
|
|
@ -216,6 +216,8 @@ class UsersController(BaseController):
|
|||
prefix_error=False,
|
||||
encoding="UTF-8",
|
||||
force_defaults=False)
|
||||
except UserCreationError as e:
|
||||
h.flash(e, 'error')
|
||||
except Exception:
|
||||
log.exception("Exception updating user")
|
||||
h.flash(_('Error occurred during update of user %s')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue