Commits

Marcin Kuzminski committed 24d9066

Don't cast to string on warning about deleting an user who still owns repositories

  • Participants
  • Parent commits 747c1c7

Comments (0)

Files changed (1)

File rhodecode/controllers/admin/users.py

         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'))