Commit Graph

5 Commits

Author SHA1 Message Date
David Smith 12ba61ed17 [3.1.x] Bumped minimum isort version to 5.1.0.
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.

Backport of e74b3d724e from master
2020-09-30 09:51:31 +02:00
Étienne Beaulé 4b6dfe1622 Fixed #30542 -- Fixed crash of numerical aggregations with filter.
Filters in annotations crashed when used with numerical-type
aggregations (i.e. Avg, StdDev, and Variance). This was caused as the
source expressions no not necessarily have an output_field (such as the
filter field), which lead to an AttributeError: 'WhereNode' object has
no attribute output_field.

Thanks to Chuan-Zheng Lee for the report.

Regression in c690afb873 and two following
commits.
2019-06-05 08:06:26 +02:00
Nick Pope 846624ed08 Refs #28643 -- Extracted DurationField logic for Avg() and Sum() into mixin.
Also addresses Sum() not handling the filter option correctly.
2019-01-14 14:39:57 -05:00
Nick Pope c690afb873 Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:35:41 -05:00
Nick Pope 3d5e0f8394 Refs #28643 -- Moved db function mixins to a separate module. 2019-01-14 14:26:46 -05:00