diff options
| author | Simon Charette <charette.s@gmail.com> | 2024-08-09 08:43:20 -0400 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-08-13 11:28:03 +0200 |
| commit | df236b0bcbbf1f54dfe6acc7761cd81b76ebf2cc (patch) | |
| tree | cef9184d9269ffcbe22d4f9c1afe81b186b91b41 /docs | |
| parent | dbca05698a14d6c771346d3fe6b72159cb32ce14 (diff) | |
[5.1.x] Fixed #35665 -- Fixed a crash when passing an empty order_by to Window.
This also caused un-ordered sliced prefetches to crash as they rely on Window.
Regression in e16d0c176e9b89628cdec5e58c418378c4a2436a that made OrderByList
piggy-back ExpressionList without porting the empty handling that the latter
provided.
Supporting explicit empty ordering on Window functions and slicing is arguably
a foot-gun design due to how backends will return undeterministic results but
this is a problem that requires a larger discussion.
Refs #35064.
Thanks Andrew Backer for the report and Mariusz for the review.
Backport of 602fe961e6834d665f2359087a1272e9f9806b71 from main.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/5.1.1.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/releases/5.1.1.txt b/docs/releases/5.1.1.txt index f307b2a0ee..25c0b4c297 100644 --- a/docs/releases/5.1.1.txt +++ b/docs/releases/5.1.1.txt @@ -9,4 +9,6 @@ Django 5.1.1 fixes several bugs in 5.1. Bugfixes ======== -* ... +* Fixed a regression in Django 5.1 that caused a crash of ``Window()`` when + passing an empty sequence to the ``order_by`` parameter, and a crash of + ``Prefetch()`` for a sliced queryset without ordering (:ticket:`35665`). |
