summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2024-12-22 23:23:28 -0500
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-02-06 16:57:44 +0100
commit0bac41fc7e4a842e8d20319cba31cc645501c245 (patch)
treeec7df56a9fdad4c4089ec7ee82e585e586bbe6ae
parent089deb82b9ac2d002af36fd36f288368cdac4b53 (diff)
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.
-rw-r--r--django/db/models/lookups.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/django/db/models/lookups.py b/django/db/models/lookups.py
index 0aaa3ac6a8..c95f572e00 100644
--- a/django/db/models/lookups.py
+++ b/django/db/models/lookups.py
@@ -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