#37047 closed Bug (fixed)
Crash in Query.orderby_issubset_groupby for descending and random order_by strings
| Reported by: | Anže Pečar | Owned by: | Anže Pečar |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Release blocker | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
#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
Change History (5)
comment:1 by , 4 weeks ago
| Description: | modified (diff) |
|---|
comment:2 by , 4 weeks ago
| Owner: | set to |
|---|---|
| Severity: | Normal → Release blocker |
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 4 weeks ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Reproduced, thanks for testing the main branch!