Mercurial > kallithea
changeset 2155:24d906650cc0 beta
Don't cast to string on warning about deleting an user who still owns repositories
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 22 Mar 2012 02:35:50 +0200 |
parents | 747c1c7040a8 |
children | a27e4d44237e |
files | rhodecode/controllers/admin/users.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/admin/users.py Thu Mar 22 02:29:43 2012 +0200 +++ b/rhodecode/controllers/admin/users.py Thu Mar 22 02:35:50 2012 +0200 @@ -145,11 +145,12 @@ user_model = UserModel() try: user_model.delete(id) + Session.commit() h.flash(_('successfully deleted user'), category='success') - Session.commit() except (UserOwnsReposException, DefaultUserException), e: - h.flash(str(e), category='warning') + h.flash(e, category='warning') except Exception: + log.error(traceback.format_exc()) h.flash(_('An error occurred during deletion of user'), category='error') return redirect(url('users'))