From 5d5f95da40afbaede9f483de891c14f5da0e8218 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 26 Jan 2026 20:40:11 -0500 Subject: [PATCH] Refs #35744 -- Removed problematic __in lookup in test_intersection_in_nested_subquery. It's problematic on MongoDB. Simon: "It seems odd that we'd use __in=OuterRef("pk") over __in=[OuterRef("pk")]. It's a SQLism that only works because right-hand-side is wrapped with (...) and that's interpreted as a singleton tuple which is allowed with IN." --- tests/queries/test_qs_combinators.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py index e329d0c4f0..2b4cd2bbbd 100644 --- a/tests/queries/test_qs_combinators.py +++ b/tests/queries/test_qs_combinators.py @@ -512,12 +512,7 @@ class QuerySetSetOperationTests(TestCase): tags.filter(id=OuterRef(OuterRef("tag_id"))) ) qs = Note.objects.filter( - Exists( - Annotation.objects.filter( - Exists(tags), - notes__in=OuterRef("pk"), - ) - ) + Exists(Annotation.objects.filter(Exists(tags), notes=OuterRef("pk"))) ) self.assertIsNone(qs.first()) annotation.notes.add(note)