mirror of
https://github.com/django/django.git
synced 2025-07-25 14:14:13 +00:00
Fixed #5524 -- Do not remove cleaned_data when a form fails validation
cleaned_data is no longer deleted when form validation fails but only contains the data that did validate. Thanks to the various contributors to this patch (see ticket).
This commit is contained in:
parent
10f979fd92
commit
121fd109de
8 changed files with 46 additions and 51 deletions
|
@ -271,8 +271,6 @@ class BaseForm(StrAndUnicode):
|
|||
self._clean_fields()
|
||||
self._clean_form()
|
||||
self._post_clean()
|
||||
if self._errors:
|
||||
del self.cleaned_data
|
||||
|
||||
def _clean_fields(self):
|
||||
for name, field in self.fields.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue