MultipleChoice fields don't validate when using request.REQUEST
|Reported by:||Daniel Roseman <daniel@…>||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
MultipleChoice fields always give a validation error if you instantiate the form using data from request.REQUEST rather than request.POST.
This is because the SelectMultiple widget only uses the getlist() method if the data dictionary is a MultiValueDict, whereas request.REQUEST is a MergeDict.
Patch and tests attached.
Change History (6)
Changed 8 years ago by Daniel Roseman <daniel@…>
comment:1 Changed 7 years ago by mattmcc
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 7 years ago by mtredinnick
- Resolution set to fixed
- Status changed from new to closed