Opened 9 days ago

Closed 9 days ago

#35752 closed Bug (fixed)

In lookup doesn't work in filter()

Reported by: Csirmaz Bendegúz Owned by: Csirmaz Bendegúz
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Csirmaz Bendegúz Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (4)

comment:1 by Csirmaz Bendegúz, 9 days ago

Owner: set to Csirmaz Bendegúz
Status: newassigned

comment:2 by Sarah Boyce, 9 days ago

Triage Stage: UnreviewedAccepted

comment:3 by Sarah Boyce, 9 days ago

Triage Stage: AcceptedReady for checkin

comment:4 by Sarah Boyce <42296566+sarahboyce@…>, 9 days ago

Resolution: fixed
Status: assignedclosed

In 0bfaa55:

Fixed #35752 -- Fixed crash when using In() lookup in filters.

Note: See TracTickets for help on using tickets.
Back to Top