#35665: Prefetch() fails with "OrderByList" when queryset has no order_by and is
sliced
-------------------------------------+-------------------------------------
Reporter: Andrew | Owner: Simon
| Charette
Type: Bug | Status: assigned
Component: Database layer | Version: 5.1
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: prefetch slice | Triage Stage: Accepted
order_by |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* keywords: prefetch slice => prefetch slice order_by
* owner: (none) => Simon Charette
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
* status: new => assigned
Comment:
I managed to reproduce and the issue the issue is relatively simple to
address.
It should obviously not crash but just so you know using slicing without
ordering generally makes little sense as the backend is allowed to return
rows in any order.
--
Ticket URL: <https://code.djangoproject.com/ticket/35665#comment:1>
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/01070191370d7092-f19127e1-c393-41c6-b47e-0ffe5023d359-000000%40eu-central-1.amazonses.com.