#30542: Float-valued aggregations and annotations with filters fail with
AttributeError
-------------------------------------+-------------------------------------
     Reporter:  Chuan-Zheng Lee      |                    Owner:  Étienne
                                     |  Beaulé
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:  aggregation,         |             Triage Stage:  Accepted
  annotation, filter                 |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"4b6dfe16226a81fea464ac5f77942f4d6ba266e8" 4b6dfe1]:
 {{{
 #!CommitTicketReference repository=""
 revision="4b6dfe16226a81fea464ac5f77942f4d6ba266e8"
 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.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30542#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.6d0efd939fd480a67d1addd0d0e77f81%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to