Changeset - 24d906650cc0
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-03-22 01:35:50
marcin@python-works.com
Don't cast to string on warning about deleting an user who still owns repositories
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/users.py
Show inline comments
 
@@ -142,17 +142,18 @@ class UsersController(BaseController):
 
        #    h.form(url('delete_user', id=ID),
 
        #           method='delete')
 
        # url('user', id=ID)
 
        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'))
 

	
 
    def show(self, id, format='html'):
 
        """GET /users/id: Show a specific item"""
0 comments (0 inline, 0 general)