Document that TypedChoiceField does not coerce empty_value
|Reported by:||vanschelven||Owned by:||nobody|
|Cc:||taavi223||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When the empty value is selected in a TypedChoiceField this is not passed through the coerce function.
I suppose this is what could be deduced from the existence of the empty_value parameter, but it was very surprising to me indeed.
Current description here:
My personal feeling would be to send all values through coerce, but I suppose the alternative would be to simply document this behavior more explicitly.
Change History (7)
comment:1 Changed 4 years ago by julien
- Component changed from Uncategorized to Documentation
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Summary changed from TypedChoiceField does not coerce "" value, uses empty_value instead to Document that TypedChoiceField does not coerce empty_value
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization
Changed 3 years ago by taavi223
comment:2 Changed 3 years ago by taavi223
- Has patch set
- Triage Stage changed from Accepted to Ready for checkin