django.contrib.auth.forms.UserCreationForm.clean doesn't return cleaned_data dictionary
|Reported by:||phxx||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The clean() method of django.contrib.auth.forms.UserCreationForm looks like this (trunk version)
def clean(self): # Fill the password field so model validation won't complain about it # being blank. We'll set it with the real value below. self.instance.password = UNUSABLE_PASSWORD super(UserCreationForm, self).clean()
It is missing a return statement that returns the cleaned_data dictionary. Because of that the form.cleaned_data attribute will be None after validating the form.
I think this behaviour is not intended -- athorwise there would be a comment.
Change History (4)
comment:1 Changed 7 years ago by phxx
- Cc gregor@… added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset