Mercurial > kallithea
changeset 2153:fa637dc3e029 beta
Improved message about deleting user who owns repositories
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 22 Mar 2012 01:45:58 +0200 |
parents | e14ae8437548 |
children | 747c1c7040a8 |
files | rhodecode/model/user.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/model/user.py Wed Mar 21 21:54:30 2012 +0200 +++ b/rhodecode/model/user.py Thu Mar 22 01:45:58 2012 +0200 @@ -299,14 +299,15 @@ try: if user.username == 'default': raise DefaultUserException( - _("You can't remove this user since it's" + _(u"You can't remove this user since it's" " crucial for entire application") ) if user.repositories: + repos = [x.repo_name for x in user.repositories] raise UserOwnsReposException( - _('user "%s" still owns %s repositories and cannot be ' - 'removed. Switch owners or remove those repositories') - % (user.username, user.repositories) + _(u'user "%s" still owns %s repositories and cannot be ' + 'removed. Switch owners or remove those repositories. %s') + % (user.username, len(repos), ', '.join(repos)) ) self.sa.delete(user) except: