From 163d92c1d66e2437a676da4ac8b11291dea3290b Mon Sep 17 00:00:00 2001 From: JaeHyuck Sa Date: Sun, 21 Dec 2025 22:45:21 +0900 Subject: Fixed #36787 -- Fixed crash in In lookups with mixed expressions and strings. Signed-off-by: JaeHyuck Sa --- tests/lookup/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/lookup') 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), -- cgit v1.3