Ticket #16986: model-clean-errordict.diff
File model-clean-errordict.diff, 619 bytes (added by , 13 years ago) |
---|
-
django/forms/models.py
330 330 try: 331 331 self.instance.clean() 332 332 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}) 334 337 335 338 # Validate uniqueness if needed. 336 339 if self._validate_unique: