We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7cb9f45 + 6550584 commit 4683ad4Copy full SHA for 4683ad4
1 file changed
accounts/forms.py
@@ -41,9 +41,8 @@ def clean_username(self):
41
def clean_password2(self):
42
password1 = self.cleaned_data.get('password1')
43
password2 = self.cleaned_data.get('password2')
44
- if password1 and password2:
45
- if password1 != password2:
46
- raise forms.ValidationError(_("The two password fields didn't match."))
+ if password1 != password2:
+ raise forms.ValidationError(_("The two password fields didn't match."))
47
return password2
48
49
def save(self, commit=True):
0 commit comments