#34975: aggregate() crashes when referencing existing aggregations or window
expressions through conditional expressions
-------------------------------------+-------------------------------------
     Reporter:  Sergey Nesterenko    |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:  QuerySet, Window,    |             Triage Stage:  Ready for
  Aggregate, F                       |  checkin
    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:"911b1619ab62317aaa7594d5fd52c1b8e43969a0" 911b161]:
 {{{
 #!CommitTicketReference repository=""
 revision="911b1619ab62317aaa7594d5fd52c1b8e43969a0"
 Refs #34975 -- Handled optional source expressions in
 Expression.get_refs().

 While no code is directly exercising get_refs in a way that triggers
 a crash some expressions such as Window stash None in source_expressions
 which can obscure the origin of some bugs.

 Handling None values like we do in other source_expression traversing
 methods such as .contains_aggregates ensures we don't run into surprises
 in the future where get_refs() might be used for a different purpose.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34975#comment:15>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018be321fb3d-effe95a7-107e-417e-9c1b-08a5a135036b-000000%40eu-central-1.amazonses.com.

Reply via email to