Document that TypedChoiceField does not coerce empty_value
|Reported by:||Klaas van Schelven||Owned by:||nobody|
|Cc:||Taavi Taijala||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 6 years ago by
|Component:||Uncategorized → Documentation|
|Summary:||TypedChoiceField does not coerce "" value, uses empty_value instead → Document that TypedChoiceField does not coerce empty_value|
|Triage Stage:||Unreviewed → Accepted|
|Type:||Uncategorized → Cleanup/optimization|
comment:2 Changed 5 years ago by
|Triage Stage:||Accepted → Ready for checkin|