mirror of
https://github.com/django/django.git
synced 2025-08-01 17:42:56 +00:00
[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 inc690afb873
and two following commits. Backport of4b6dfe1622
from master.
This commit is contained in:
parent
ca3f86288a
commit
4e6f0024f1
3 changed files with 21 additions and 6 deletions
|
@ -9,4 +9,6 @@ Django 2.2.3 fixes several bugs in 2.2.2.
|
|||
Bugfixes
|
||||
========
|
||||
|
||||
* ...
|
||||
* Fixed a regression in Django 2.2 where :class:`~django.db.models.Avg`,
|
||||
:class:`~django.db.models.StdDev`, and :class:`~django.db.models.Variance`
|
||||
crash with ``filter`` argument (:ticket:`30542`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue