#30841: Using __isnull lookup to a non-boolean value doesn't promote join.
-------------------------------------+-------------------------------------
Reporter: André Ericson | Owner: André
| Ericson
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* status: assigned => closed
* type: Bug => New feature
* resolution: => wontfix
Comment:
After the reconsideration I don't think that we should change this
[https://docs.djangoproject.com/en/2.2/ref/models/querysets/#isnull
documented] behavior (that is in Django from the very beginning).
`__isnull` lookup expects boolean values in many places and IMO it would
be confusing if we'll allow for truthy/falsy values, e.g. take a look at
these examples `field__isnull='false'` or `field__isnull='true'` (both
would return the same result).
Sorry for my previous acceptation (I shouldn't triage tickets in the
weekend).
--
Ticket URL: <https://code.djangoproject.com/ticket/30841#comment:5>
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/066.e1331c1b091738baec4df626ccf7a395%40djangoproject.com.