Ticket #16423: 16423.diff

File 16423.diff, 618 bytes (added by robboyle, 13 years ago)

My initial shot at a solution.

  • django/forms/models.py

     
    330330        try:
    331331            self.instance.clean()
    332332        except ValidationError, e:
    333             self._update_errors({NON_FIELD_ERRORS: e.messages})
     333            if hasattr(e, 'message_dict'):
     334                self._update_errors(e.message_dict)
     335            else:
     336                self._update_errors({NON_FIELD_ERRORS: e.messages})
    334337
    335338        # Validate uniqueness if needed.
    336339        if self._validate_unique:
Back to Top