1
0
mirror of https://github.com/django/django.git synced 2025-07-07 03:09:22 +00:00

[soc2009/model-validation] Fixed #12078 ValidationError(s) from specific fields not rendered on admin add/change form.

Thanks to Killarny for detailed report

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Honza Král 2009-12-28 17:41:56 +00:00
parent f911df19a4
commit 5559eb56fe

View File

@ -248,7 +248,7 @@ class BaseModelForm(BaseForm):
except ValidationError, e: except ValidationError, e:
for k, v in e.message_dict.items(): for k, v in e.message_dict.items():
if k != NON_FIELD_ERRORS: if k != NON_FIELD_ERRORS:
self._errors.setdefault(k, []).extend(v) self._errors.setdefault(k, ErrorList()).extend(v)
# Remove the data from the cleaned_data dict since it was invalid # Remove the data from the cleaned_data dict since it was invalid
if k in self.cleaned_data: if k in self.cleaned_data: