# HG changeset patch # User Marcin Kuzminski # Date 1332376550 -7200 # Node ID 24d906650cc0c8fe0c4f6bb76772f9b8f77e9985 # Parent 747c1c7040a8cb944497fdb21b7a7e066298f61a Don't cast to string on warning about deleting an user who still owns repositories diff -r 747c1c7040a8 -r 24d906650cc0 rhodecode/controllers/admin/users.py --- 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'))