summaryrefslogtreecommitdiff
path: root/tests/lookup
diff options
context:
space:
mode:
authorJaeHyuck Sa <wogur981208@gmail.com>2025-12-21 22:45:21 +0900
committerJacob Walls <jacobtylerwalls@gmail.com>2025-12-22 14:25:45 -0500
commit163d92c1d66e2437a676da4ac8b11291dea3290b (patch)
tree24793364cb492f051d3b56a54a415ce027e10e5f /tests/lookup
parent95394443bff2cd6c5cb47c752422fe1f391bb43d (diff)
Fixed #36787 -- Fixed crash in In lookups with mixed expressions and strings.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
Diffstat (limited to 'tests/lookup')
-rw-r--r--tests/lookup/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py
index 5b9dd8e5ec..31f247964c 100644
--- a/tests/lookup/tests.py
+++ b/tests/lookup/tests.py
@@ -1855,6 +1855,14 @@ class LookupQueryingTests(TestCase):
Season.objects.filter(In(F("year"), years)).order_by("pk"), seasons
)
+ def test_in_lookup_in_filter_text_field(self):
+ self.assertSequenceEqual(
+ Season.objects.filter(
+ In(F("nulled_text_field"), [F("nulled_text_field"), "special_value"])
+ ),
+ [self.s2],
+ )
+
def test_filter_lookup_lhs(self):
qs = Season.objects.annotate(before_20=LessThan(F("year"), 2000)).filter(
before_20=LessThan(F("year"), 1900),