1. Luke Plant
  2. django

Commits

Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed baa4caa

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

Thanks to Killarny for detailed report

  • Participants
  • Parent commits 89416dd
  • Branches soc2009/model-validation

Comments (0)

Files changed (1)

File django/forms/models.py

View file
         except ValidationError, e:
             for k, v in e.message_dict.items():
                 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
                     if k in self.cleaned_data: