mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 07:46:30 +01:00
Removed uneccessary test function.
This commit is contained in:
parent
e752c2dd64
commit
005b969425
1 changed files with 0 additions and 11 deletions
|
|
@ -141,17 +141,6 @@ class UserAdmin(BaseUserAdmin):
|
|||
{'fields': ('username', 'password1', 'password2', 'email'),
|
||||
'description':"<i>These account details are shared by the admin system and the game.</i>"},),)
|
||||
|
||||
def is_valid(self):
|
||||
raise Exception
|
||||
if not super(UserAdmin, self).is_valid():
|
||||
return False
|
||||
username = self.cleaned_data['username']
|
||||
if self.instance and self.instance.username.upper() == username.upper():
|
||||
return True
|
||||
elif User.objects.filter(username__iexact=username):
|
||||
raise ValidationError({'username' : 'A player with that name already exists.'})
|
||||
return True
|
||||
|
||||
def save_formset(self, request, form, formset, change):
|
||||
"Run all hooks on the player object"
|
||||
super(UserAdmin, self).save_formset(request, form, formset, change)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue