Refs #14476 -- Added a test for default annotation name access in aggregate.
Fixed in f59fd15c49
This commit is contained in:
parent
16a8d01308
commit
3e1bb5cfb8
|
@ -1014,6 +1014,11 @@ class AggregationTests(TestCase):
|
||||||
['Peter Norvig'],
|
['Peter Norvig'],
|
||||||
lambda b: b.name
|
lambda b: b.name
|
||||||
)
|
)
|
||||||
|
# Referencing the auto-generated name in an aggregate() also works.
|
||||||
|
self.assertEqual(
|
||||||
|
Author.objects.annotate(Count('book')).aggregate(Max('book__count')),
|
||||||
|
{'book__count__max': 2}
|
||||||
|
)
|
||||||
|
|
||||||
def test_annotate_joins(self):
|
def test_annotate_joins(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue