Skip to content

Commit 5d5f95d

Browse files
timgrahamjacobtylerwalls
authored andcommitted
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."
1 parent b30e09a commit 5d5f95d

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

tests/queries/test_qs_combinators.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,7 @@ def test_intersection_in_nested_subquery(self):
512512
tags.filter(id=OuterRef(OuterRef("tag_id")))
513513
)
514514
qs = Note.objects.filter(
515-
Exists(
516-
Annotation.objects.filter(
517-
Exists(tags),
518-
notes__in=OuterRef("pk"),
519-
)
520-
)
515+
Exists(Annotation.objects.filter(Exists(tags), notes=OuterRef("pk")))
521516
)
522517
self.assertIsNone(qs.first())
523518
annotation.notes.add(note)

0 commit comments

Comments
 (0)