Ticket #11946: 11946.remove_lookup_overrides.diff

File 11946.remove_lookup_overrides.diff, 1.8 KB (added by emulbreh, 6 years ago)
  • django/db/models/fields/related.py

     
    628628
    629629class ManyToOneRel(object):
    630630    def __init__(self, to, field_name, related_name=None,
    631             limit_choices_to=None, lookup_overrides=None, parent_link=False):
     631            limit_choices_to=None, parent_link=False):
    632632        try:
    633633            to._meta
    634634        except AttributeError: # to._meta doesn't exist, so it must be RECURSIVE_RELATIONSHIP_CONSTANT
     
    638638        if limit_choices_to is None:
    639639            limit_choices_to = {}
    640640        self.limit_choices_to = limit_choices_to
    641         self.lookup_overrides = lookup_overrides or {}
    642641        self.multiple = True
    643642        self.parent_link = parent_link
    644643
     
    655654
    656655class OneToOneRel(ManyToOneRel):
    657656    def __init__(self, to, field_name, related_name=None,
    658             limit_choices_to=None, lookup_overrides=None, parent_link=False):
     657            limit_choices_to=None, parent_link=False):
    659658        super(OneToOneRel, self).__init__(to, field_name,
    660659                related_name=related_name, limit_choices_to=limit_choices_to,
    661                 lookup_overrides=lookup_overrides, parent_link=parent_link)
     660                parent_link=parent_link)
    662661        self.multiple = False
    663662
    664663class ManyToManyRel(object):
     
    696695        kwargs['rel'] = rel_class(to, to_field,
    697696            related_name=kwargs.pop('related_name', None),
    698697            limit_choices_to=kwargs.pop('limit_choices_to', None),
    699             lookup_overrides=kwargs.pop('lookup_overrides', None),
    700698            parent_link=kwargs.pop('parent_link', False))
    701699        Field.__init__(self, **kwargs)
    702700
Back to Top