Skip to content

Commit

Permalink
Refs #34975 -- Removed unnecessary lookups.In.get_refs().
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
charettes authored and sarahboyce committed Feb 6, 2025
1 parent 089deb8 commit 0bac41f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions django/db/models/lookups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0bac41f

Please sign in to comment.