mirror of
https://github.com/django/django.git
synced 2026-02-09 02:49:25 +08:00
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."
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user