diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-03-14 04:32:52 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-03-14 04:32:52 +0000 |
| commit | 84ce18fc9bbb8a7debd8904f746ae8c57844d291 (patch) | |
| tree | 989b0bfbcdc518fe47006f95e3309f988512746a /tests/regressiontests/aggregation_regress | |
| parent | 83c1572cc47283b97c78a4b695788bcb755ca358 (diff) | |
Fixed #10425 -- Corrected the interaction of .count() with .annotate() when .values() is also involved. Thanks to kmassey for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/aggregation_regress')
| -rw-r--r-- | tests/regressiontests/aggregation_regress/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/aggregation_regress/models.py b/tests/regressiontests/aggregation_regress/models.py index f2763d5c04..275ea07390 100644 --- a/tests/regressiontests/aggregation_regress/models.py +++ b/tests/regressiontests/aggregation_regress/models.py @@ -252,6 +252,13 @@ FieldError: Cannot resolve keyword 'foo' into field. Choices are: authors, conta >>> [int(x['sheets']) for x in qs] [150, 175, 224, 264, 473, 566] +# Regression for 10425 - annotations don't get in the way of a count() clause +>>> Book.objects.values('publisher').annotate(Count('publisher')).count() +4 + +>>> Book.objects.annotate(Count('publisher')).values('publisher').count() +6 + """ } |
