BooleanField fails to work when processing data from as_hidden
|Reported by:||Paul Lanier <planier@…>||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If a BooleanField is referenced in the Template with .as_hidden then the returned value for False is '0'. Since BooleanField does a simple bool() in clean, this is converted to True.
The patch adds an explicit check for '0' and returns false in this case.
Change History (3)
Changed 7 years ago by Paul Lanier <planier@…>
comment:1 Changed 7 years ago by planier
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin