1
0
mirror of https://github.com/django/django.git synced 2025-04-14 12:24:36 +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:
Simon Charette 2024-12-22 23:23:28 -05:00 committed by Sarah Boyce
parent 089deb82b9
commit 0bac41fc7e

View File

@ -495,14 +495,6 @@ class IntegerLessThanOrEqual(IntegerFieldOverflow, LessThanOrEqual):
class In(FieldGetDbPrepValueIterableMixin, BuiltinLookup):
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):
from django.db.models.sql.query import Query # avoid circular import