[Django] #35752: In lookup doesn't work in filter()

16 views
Skip to first unread message

Django

unread,
Sep 11, 2024, 4:46:39 AM9/11/24
to django-...@googlegroups.com
#35752: In lookup doesn't work in filter()
-------------------------------------+-------------------------------------
Reporter: Csirmaz Bendegúz | Type: Bug
Status: new | Component: Database
| layer (models, ORM)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
At the moment, the {{{In}}} lookup cannot be used in {{{.filter()}}}.

The following raises an error:

{{{
.filter(In(F("field"), [1, 2, 3]))
# AttributeError: 'F' object has no attribute 'output_field'
}}}

I believe this is a bug, {{{In}}} should work in {{{.filter()}}} similar
to the other lookups.
--
Ticket URL: <https://code.djangoproject.com/ticket/35752>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 11, 2024, 4:48:38 AM9/11/24
to django-...@googlegroups.com
#35752: In lookup doesn't work in filter()
-------------------------------------+-------------------------------------
Reporter: Csirmaz Bendegúz | Owner: Csirmaz
| Bendegúz
Type: Bug | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Csirmaz Bendegúz):

* owner: (none) => Csirmaz Bendegúz
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35752#comment:1>

Django

unread,
Sep 11, 2024, 5:26:03 AM9/11/24
to django-...@googlegroups.com
#35752: In lookup doesn't work in filter()
-------------------------------------+-------------------------------------
Reporter: Csirmaz Bendegúz | Owner: Csirmaz
| Bendegúz
Type: Bug | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
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 Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/35752#comment:2>

Django

unread,
Sep 11, 2024, 5:30:54 AM9/11/24
to django-...@googlegroups.com
#35752: In lookup doesn't work in filter()
-------------------------------------+-------------------------------------
Reporter: Csirmaz Bendegúz | Owner: Csirmaz
| Bendegúz
Type: Bug | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35752#comment:3>

Django

unread,
Sep 11, 2024, 6:42:27 AM9/11/24
to django-...@googlegroups.com
#35752: In lookup doesn't work in filter()
-------------------------------------+-------------------------------------
Reporter: Csirmaz Bendegúz | Owner: Csirmaz
| Bendegúz
Type: Bug | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"0bfaa55708d402432d44882d9a8e4cb85011472c" 0bfaa55]:
{{{#!CommitTicketReference repository=""
revision="0bfaa55708d402432d44882d9a8e4cb85011472c"
Fixed #35752 -- Fixed crash when using In() lookup in filters.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35752#comment:4>
Reply all
Reply to author
Forward
0 new messages