mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
Refs #34975 -- Removed unnecessary lookups.In.get_refs().
Now that In.get_source_expression() includes its right-hand-side when it contains expressions (refs #36025) it no longer requires a specialized get_refs() method.
This commit is contained in:
parent
089deb82b9
commit
0bac41fc7e
@ -495,14 +495,6 @@ class IntegerLessThanOrEqual(IntegerFieldOverflow, LessThanOrEqual):
|
|||||||
class In(FieldGetDbPrepValueIterableMixin, BuiltinLookup):
|
class In(FieldGetDbPrepValueIterableMixin, BuiltinLookup):
|
||||||
lookup_name = "in"
|
lookup_name = "in"
|
||||||
|
|
||||||
def get_refs(self):
|
|
||||||
refs = super().get_refs()
|
|
||||||
if self.rhs_is_direct_value():
|
|
||||||
for rhs in self.rhs:
|
|
||||||
if get_rhs_refs := getattr(rhs, "get_refs", None):
|
|
||||||
refs |= get_rhs_refs()
|
|
||||||
return refs
|
|
||||||
|
|
||||||
def get_prep_lookup(self):
|
def get_prep_lookup(self):
|
||||||
from django.db.models.sql.query import Query # avoid circular import
|
from django.db.models.sql.query import Query # avoid circular import
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user