diff options
author | Simon Charette <simon.charette@zapier.com> | 2019-05-12 17:17:47 -0400 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-07-15 10:58:29 +0200 |
commit | 1e38f1191de21b6e96736f58df57dfb851a28c1f (patch) | |
tree | 99b2c92d87d4d351d1f180e93a543b8903ec28d3 /tests/aggregation_regress | |
parent | d08e6f55e3a986a8d4b3a58431d9615c7bc81eaa (diff) | |
download | django-1e38f1191de21b6e96736f58df57dfb851a28c1f.tar.gz |
Fixed #30446 -- Resolved Value.output_field for stdlib types.
This required implementing a limited form of dynamic dispatch to combine
expressions with numerical output. Refs #26355 should eventually provide
a better interface for that.
Diffstat (limited to 'tests/aggregation_regress')
-rw-r--r-- | tests/aggregation_regress/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/aggregation_regress/tests.py b/tests/aggregation_regress/tests.py index bdfcb1d89b..b298a1f132 100644 --- a/tests/aggregation_regress/tests.py +++ b/tests/aggregation_regress/tests.py @@ -388,7 +388,7 @@ class AggregationTests(TestCase): ) def test_annotated_conditional_aggregate(self): - annotated_qs = Book.objects.annotate(discount_price=F('price') * 0.75) + annotated_qs = Book.objects.annotate(discount_price=F('price') * Decimal('0.75')) self.assertAlmostEqual( annotated_qs.aggregate(test=Avg(Case( When(pages__lt=400, then='discount_price'), |