mirror of
https://github.com/django/django.git
synced 2025-08-16 00:30:47 +00:00
Fixed #28900 -- Propagated all selected fields to combinator queries.
Previously, only the selected column aliases would be propagated and annotations were ignored.
This commit is contained in:
parent
65ad4ade74
commit
6d220963fa
3 changed files with 14 additions and 13 deletions
|
@ -282,11 +282,7 @@ class QuerySetSetOperationTests(TestCase):
|
|||
)
|
||||
.values_list("num", "count")
|
||||
)
|
||||
qs2 = (
|
||||
Number.objects.filter(num=2)
|
||||
.extra(select={"count": 1})
|
||||
.values_list("num", "count")
|
||||
)
|
||||
qs2 = Number.objects.filter(num=2).extra(select={"count": 1})
|
||||
self.assertCountEqual(qs1.union(qs2), [(1, 0), (2, 1)])
|
||||
|
||||
def test_union_with_values_list_on_annotated_and_unannotated(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue