Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#26891 closed Bug (fixed)

ForeignObject/ForeignKey does not obey lookup registration API

Reported by: Ryan P Kilby Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: rpkilby@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ryan P Kilby)

ForeignObject's implementation of get_lookup and get_transform causes register_lookup to essentially have no effect.

The PR should allow users to successfully register lookups while ignoring the default lookups registered to Field. This works by duplicating RegisterLookupMixin._get_lookup, but stopping mro walking at ForeignObject.
https://github.com/django/django/pull/6906

Change History (5)

comment:1 Changed 4 years ago by Ryan P Kilby

Cc: rpkilby@… added
Description: modified (diff)

comment:2 Changed 4 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:3 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 7aeb7390:

Fixed #26891 -- Fixed lookup registration for ForeignObject.

comment:4 Changed 2 years ago by Tim Graham <timograham@…>

In a67ebcb1:

Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups().

comment:5 Changed 2 years ago by Carlton Gibson <carlton.gibson@…>

In a0043501:

[2.1.x] Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups().

Backport of a67ebcb1cbd37e1fc9eddd2da1dda7f319c5ac1d from master

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