#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
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"4e6f0024f19f74be2fe4d9ec637b87e82054ebd6" 4e6f002]:
 {{{
 #!CommitTicketReference repository=""
 revision="4e6f0024f19f74be2fe4d9ec637b87e82054ebd6"
 [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 c690afb873cac8035a3cb3be7c597a5ff0e4b261 and two following
 commits.

 Backport of 4b6dfe16226a81fea464ac5f77942f4d6ba266e8 from master.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30542#comment:6>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.e0722f1ddbaf6d0f20a38116b6ecad35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to