#37047: Crash in Query.orderby_issubset_groupby for descending and random 
order_by
strings
-------------------------------------+-------------------------------------
     Reporter:  Anže Pečar           |                    Owner:  Anže
                                     |  Pečar
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

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

Comment:

 In [changeset:"a284a49153f005f2a7af087025e5112ba06cbd5f" a284a49]:
 {{{#!CommitTicketReference repository=""
 revision="a284a49153f005f2a7af087025e5112ba06cbd5f"
 Fixed #37047 -- Fixed crash in Query.orderby_issubset_groupby for
 descending and random order_by strings.

 Run this example:

 ```python
 
User.objects.values("is_staff").annotate(latest=Max("date_joined")).order_by("-latest").count()
 ```

 You should see the following exception:

 ```
 django.core.exceptions.FieldError: Cannot resolve keyword '-latest' into
 field.
 ```

 Regression in 2ce5cb0f7a4618dfdc5f5c10e53e2e9b9543d298.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37047#comment:4>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019da4c3e52f-e0d2a2d6-ac78-4987-b1af-0a5b269ba119-000000%40eu-central-1.amazonses.com.

Reply via email to