diff --git a/accounts/forms.py b/accounts/forms.py index 92cfd4f..7118cee 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -18,8 +18,8 @@ class LoginForm(forms.Form): return data def clean(self): - phone = normalize_phone(self.cleaned_data['phone']) - password = self.cleaned_data['password'] + phone = normalize_phone(self.data['phone']) + password = self.data['password'] try: profile = Profile.objects.get(phone=phone) user = authenticate(username=profile.phone, password=password)