Changes between Initial Version and Version 1 of Ticket #24008
- Timestamp:
- 12/17/14 14:54:14 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24008
-
Property
Component
changed from
Uncategorized
toCore (Other)
-
Property
Version
changed from
1.6
to1.7
-
Property
Type
changed from
Uncategorized
toBug
-
Property
Triage Stage
changed from
Unreviewed
toAccepted
-
Property
Component
changed from
-
Ticket #24008 – Description
initial v1 4 4 5 5 For example: 6 6 {{{ 7 7 >>> from django.core.exceptions import ValidationError 8 8 >>> ValidationError([ValidationError({'age', 'age cannot be negative'}), ValidationError('Some other error')]) 9 9 }}} 10 10 The problem is caused because when a ValidationError instance is initialised with a dictionary, its error_list attribute is not set (instead error_dict is set) but a ValidationError that is initialised with a list tries to compile a flattened list of all errors using this attribute from each list element. Either ValidationError should be modified to accept a mixture of field and non-field errors (appears to me to be the best solution) or the documentation and error message should be changed to make usage clear. 11 11