mirror of
https://github.com/django/django.git
synced 2025-03-06 07:22:32 +00:00
[5.2.x] 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. Backport of 0bac41fc7e4a842e8d20319cba31cc645501c245 from main.
This commit is contained in:
parent
d99985bbc1
commit
0690c06013
@ -514,14 +514,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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user