#29618: using query parameters to filter by boolean causes validation error due
to
lowercase true/false
-------------------------------------+-------------------------------------
Reporter: levi schubert | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: filter | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* component: Uncategorized => Database layer (models, ORM)
Comment:
I believe the request is to allow
`Mode.objects.filter(booleanfield='true')` (see
[https://github.com/django/django/blob/master/django/db/models/fields/__init__.py#L997-L1007
BooleanField.to_python()]). I don't find the existing laxness of accepting
0, 1, 't', 'f', 'True', 'False', True, and False particularly compelling
and I wouldn't advocate for being even more liberal in the accepted
values.
--
Ticket URL: <https://code.djangoproject.com/ticket/29618#comment:3>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.778651dfd87487112cac7013ab0bcbcd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.