#37047: Crash in Query.orderby_issubset_groupby for descending and random
order_by
strings
-------------------------------------+-------------------------------------
Reporter: Anže Pečar | Type: Bug
Status: new | Component: Database
| layer (models, ORM)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
ticket-26434 caused a crash. It can be reproduced with:
{{{
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. Choices are: activity_logs, date_joined, email, first_name, groups,
id, is_active, is_administrator, is_staff, is_superuser, last_login,
last_name, latest, logentry, module_access, password, user_permissions,
username
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37047>
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/0107019da06f7329-d2fad068-de97-448e-9640-5d3687e20bc6-000000%40eu-central-1.amazonses.com.