Show More
@@ -299,14 +299,15 b' class UserModel(BaseModel):' | |||||
299 | try: |
|
299 | try: | |
300 | if user.username == 'default': |
|
300 | if user.username == 'default': | |
301 | raise DefaultUserException( |
|
301 | raise DefaultUserException( | |
302 | _("You can't remove this user since it's" |
|
302 | _(u"You can't remove this user since it's" | |
303 | " crucial for entire application") |
|
303 | " crucial for entire application") | |
304 | ) |
|
304 | ) | |
305 | if user.repositories: |
|
305 | if user.repositories: | |
|
306 | repos = [x.repo_name for x in user.repositories] | |||
306 | raise UserOwnsReposException( |
|
307 | raise UserOwnsReposException( | |
307 | _('user "%s" still owns %s repositories and cannot be ' |
|
308 | _(u'user "%s" still owns %s repositories and cannot be ' | |
308 | 'removed. Switch owners or remove those repositories') |
|
309 | 'removed. Switch owners or remove those repositories. %s') | |
309 |
% (user.username, |
|
310 | % (user.username, len(repos), ', '.join(repos)) | |
310 | ) |
|
311 | ) | |
311 | self.sa.delete(user) |
|
312 | self.sa.delete(user) | |
312 | except: |
|
313 | except: |
General Comments 0
You need to be logged in to leave comments.
Login now