#23130: BooleanField should not override 'blank' if choices are specified
-------------------------------------+-------------------------------------
Reporter: Jonas H. | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* has_patch: 1 => 0
* easy: 1 => 0
Comment:
This is not a test of described issue, please check a sample project
attached to the ticket and previous versions of this patch. Issue
described in the [https://code.djangoproject.com/ticket/23130#comment:4
comment#4] is fixed but it's about validation of blank option for
`BooleanField` with `choices`, e.g.
{{{
boolean = models.BooleanField(choices=[(True, "Special True"), (False,
"Special False")],
}}}
so it's not a proper test. I'm also not sure if behavior for `blank=True`
is correct, e.g.
{{{
boolean = models.BooleanField(choices=[(True, "Special True"), (False,
"Special False")], blank=True)
}}}
because choosing a blank value causes:
`django.core.exceptions.ValidationError: ['“” value must be either True or
False.']`.
--
Ticket URL: <https://code.djangoproject.com/ticket/23130#comment:26>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.6c92379595605114d00faef4ed8fa6d8%40djangoproject.com.