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:
Claude Paroz 2012-08-04 14:17:02 +02:00
parent 10f979fd92
commit 121fd109de
8 changed files with 46 additions and 51 deletions

View file

@ -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():