# HG changeset patch # User Johannes Bornhold # Date 2016-05-30 10:16:25 # Node ID b3a11d63dd7d8922421867ff2a890a81198b29eb # Parent 636c8b2a35e8136153a1422fa9ee032f1a004861 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. diff --git a/rhodecode/controllers/admin/users.py b/rhodecode/controllers/admin/users.py --- a/rhodecode/controllers/admin/users.py +++ b/rhodecode/controllers/admin/users.py @@ -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')