Re: [Django] #37140: Document how to handle NULL when using filter()/exclude() with __in subqueries

5 views
Skip to first unread message

Django

unread,
Jun 15, 2026, 2:58:40 PM (12 days ago) Jun 15
to django-...@googlegroups.com
#37140: Document how to handle NULL when using filter()/exclude() with __in
subqueries
-------------------------------------+-------------------------------------
Reporter: Sebastian Vera | Owner: joseanoxp
Type: Bug | Status: assigned
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: exclude in subquery | Triage Stage: Accepted
NULL NOT IN |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by joseanoxp):

* cc: joseanoxp (added)
* has_patch: 0 => 1
* needs_docs: 0 => 1
* needs_tests: 0 => 1
* owner: (none) => joseanoxp
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37140#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 15, 2026, 3:42:01 PM (12 days ago) Jun 15
to django-...@googlegroups.com
#37140: Document how to handle NULL when using filter()/exclude() with __in
subqueries
-------------------------------------+-------------------------------------
Reporter: Sebastian Vera | Owner: (none)
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: exclude in subquery | Triage Stage: Accepted
NULL NOT IN |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* has_patch: 1 => 0
* needs_docs: 1 => 0
* needs_tests: 1 => 0
* owner: Joseano Sousa => (none)
* status: assigned => new

Comment:

Claude patch wasn't close enough to iterate on.
--
Ticket URL: <https://code.djangoproject.com/ticket/37140#comment:6>

Django

unread,
Jun 17, 2026, 1:01:42 AM (10 days ago) Jun 17
to django-...@googlegroups.com
#37140: Document how to handle NULL when using filter()/exclude() with __in
subqueries
-------------------------------------+-------------------------------------
Reporter: Sebastian Vera | Owner: (none)
Type: Bug | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: exclude in subquery | Triage Stage: Accepted
NULL NOT IN |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by SnippyCodes):

I'd like to take this over! I will update the __in field lookup
documentation to warn about the NULL subquery behavior for both filter()
and exclude(). Following Simon's advice, I will document
filter(inner_field__isnull=False) as the recommended workaround.
--
Ticket URL: <https://code.djangoproject.com/ticket/37140#comment:7>

Django

unread,
Jun 17, 2026, 1:02:34 AM (10 days ago) Jun 17
to django-...@googlegroups.com
#37140: Document how to handle NULL when using filter()/exclude() with __in
subqueries
-------------------------------------+-------------------------------------
Reporter: Sebastian Vera | Owner:
| SnippyCodes
Type: Bug | Status: assigned
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: exclude in subquery | Triage Stage: Accepted
NULL NOT IN |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by SnippyCodes):

* has_patch: 0 => 1
* owner: (none) => SnippyCodes
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37140#comment:8>
Reply all
Reply to author
Forward
0 new messages