mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #29108 -- Fixed crash in aggregation of distinct+ordered+sliced querysets.
Regression in 4acae21846
.
Thanks Stephen Brooks for the report.
This commit is contained in:
parent
01bfa9219b
commit
d61fe24601
3 changed files with 9 additions and 3 deletions
|
@ -1918,6 +1918,9 @@ class Queries6Tests(TestCase):
|
|||
qs = Tag.objects.exclude(category=None).exclude(category__name='foo')
|
||||
self.assertEqual(str(qs.query).count(' INNER JOIN '), 1)
|
||||
|
||||
def test_distinct_ordered_sliced_subquery_aggregation(self):
|
||||
self.assertEqual(Tag.objects.distinct().order_by('category__name')[:3].count(), 3)
|
||||
|
||||
|
||||
class RawQueriesTests(TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue