mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #36149 -- Allowed subquery values against tuple exact and in lookups.
Non-tuple exact and in lookups have specialized logic for subqueries that can be adapted to properly assign select mask if unspecified and ensure the number of involved members are matching on both side of the operator.
This commit is contained in:
committed by
Sarah Boyce
parent
0597e8ad1e
commit
41239fe34d
@@ -922,20 +922,6 @@ class Queries1Tests(TestCase):
|
||||
[self.t2, self.t3],
|
||||
)
|
||||
|
||||
# Multi-valued values() and values_list() querysets should raise errors.
|
||||
with self.assertRaisesMessage(
|
||||
TypeError, "Cannot use multi-field values as a filter value."
|
||||
):
|
||||
Tag.objects.filter(
|
||||
name__in=Tag.objects.filter(parent=self.t1).values("name", "id")
|
||||
)
|
||||
with self.assertRaisesMessage(
|
||||
TypeError, "Cannot use multi-field values as a filter value."
|
||||
):
|
||||
Tag.objects.filter(
|
||||
name__in=Tag.objects.filter(parent=self.t1).values_list("name", "id")
|
||||
)
|
||||
|
||||
def test_ticket9985(self):
|
||||
# qs.values_list(...).values(...) combinations should work.
|
||||
self.assertSequenceEqual(
|
||||
|
||||
Reference in New Issue
Block a user