1
0
mirror of https://github.com/django/django.git synced 2025-01-26 18:19:18 +00: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 c690afb873cac8035a3cb3be7c597a5ff0e4b261 and two following
commits.
2019-06-05 08:06:26 +02:00
..
2019-04-27 07:47:42 +02:00
2019-03-02 12:19:21 +01:00
2019-04-27 07:47:42 +02:00

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ python -m pip install -e ..
    $ python -m pip install -r requirements/py3.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.