Browse Source

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.
Simon Charette 3 tháng trước cách đây
mục cha
commit
0bac41fc7e
1 tập tin đã thay đổi với 0 bổ sung8 xóa
  1. 0 8
      django/db/models/lookups.py

+ 0 - 8
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