Fixed broken import
This commit is contained in:
parent
e3e0a2eaf4
commit
7b0148a533
|
@ -27,8 +27,8 @@ class MyUserCreationForm(UserCreationForm):
|
||||||
def clean_username(self):
|
def clean_username(self):
|
||||||
username = self.cleaned_data["username"]
|
username = self.cleaned_data["username"]
|
||||||
try:
|
try:
|
||||||
User.objects.get(username=username)
|
models.User.objects.get(username=username)
|
||||||
except User.DoesNotExist:
|
except models.User.DoesNotExist:
|
||||||
return username
|
return username
|
||||||
raise forms.ValidationError(self.error_messages["duplicate_username"])
|
raise forms.ValidationError(self.error_messages["duplicate_username"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue