1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #35747 -- Used default ordering when the ORDER_VAR param is blank in the admin changelist.

This commit is contained in:
ldeluigi
2024-09-11 09:04:46 +02:00
committed by Sarah Boyce
parent 371a9f3c5f
commit 2a4321ba23
2 changed files with 15 additions and 1 deletions

View File

@@ -395,7 +395,7 @@ class ChangeList:
ordering = list(
self.model_admin.get_ordering(request) or self._get_default_ordering()
)
if ORDER_VAR in params:
if params.get(ORDER_VAR):
# Clear ordering and used params
ordering = []
order_params = params[ORDER_VAR].split(".")