django1/django/db/models
Étienne Beaulé 4e6f0024f1 [2.2.x] 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.

Backport of 4b6dfe1622 from master.
2019-06-05 09:15:21 +02:00
..
fields [2.2.x] Fixed #26678 -- Doc'd that RelatedManager.add()/remove()/set() accepts the field the relation points to. 2019-05-07 12:58:55 +02:00
functions [2.2.x] Fixed #30542 -- Fixed crash of numerical aggregations with filter. 2019-06-05 09:15:21 +02:00
sql [2.2.x] Fixed #30463 -- Fixed crash of deprecation message when Meta.ordering contains expressions. 2019-05-18 20:05:31 +02:00
__init__.py Fixed #11964 -- Added support for database check constraints. 2018-07-10 15:32:33 -04:00
aggregates.py [2.2.x] Fixed #30120 -- Fixed invalid SQL in distinct aggregate. 2019-01-21 09:24:47 -05:00
base.py [2.2.x] Fixed #30280 -- Restored Model.get_FIELD_display()'s coercion of lazy strings. 2019-03-22 13:01:15 -04:00
constants.py Refactored qs.add_q() and utils/tree.py 2013-03-13 10:44:49 +02:00
constraints.py Fixed #30062 -- Added support for unique conditional constraints. 2019-01-12 09:50:20 -05:00
deletion.py [2.2.x] Fixed #30330 -- Fixed setting of primary key to None during fast-delete. 2019-04-08 21:44:17 +02:00
expressions.py Fixed #30099 -- Fixed invalid SQL when filtering a Subquery by an aggregate. 2019-01-15 07:22:59 -05:00
indexes.py Used None as the empty value for condition in Index's SQL construction. 2019-01-12 09:34:10 -05:00
lookups.py Fixed #29503 -- Made __in lookup keep order of values in query. 2018-06-20 09:29:06 -04:00
manager.py Fixed #28982 -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
options.py Fixed #11964 -- Added support for database check constraints. 2018-07-10 15:32:33 -04:00
query.py [2.2.x] Fixed #30184 -- Removed ellipsis characters from shell output strings. 2019-02-13 14:00:53 -05:00
query_utils.py Replaced kwargs.pop() with keyword-only arguments. 2018-10-08 15:06:02 -04:00
signals.py Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00
utils.py Refs #27656 -- Updated django.db docstring verbs according to PEP 257. 2017-02-28 09:17:27 -05:00