Opened 8 years ago

Closed 8 years ago

Last modified 6 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 by Ryan P Kilby, 8 years ago

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

comment:2 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 7aeb7390:

Fixed #26891 -- Fixed lookup registration for ForeignObject.

comment:4 by Tim Graham <timograham@…>, 6 years ago

In a67ebcb1:

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

comment:5 by Carlton Gibson <carlton.gibson@…>, 6 years ago

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