Ticket #29121: fix_changelist_params.patch

File fix_changelist_params.patch, 987 bytes (added by Jeffrey Bian, 7 years ago)

This patch is against master branch

  • django/contrib/admin/views/main.py

    From db3c0c513a8c76bf1a252c78565a3ea90d4ce5cf Mon Sep 17 00:00:00 2001
    From: Jeffrey Bian <jeffrey@modsy.com>
    Date: Thu, 8 Feb 2018 15:06:22 -0800
    Subject: [PATCH] Using lists() vs items() for changelist params
    
    ---
     django/contrib/admin/views/main.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py
    index 5141b9e..3ab0934 100644
    a b class ChangeList:  
    6363        if to_field and not model_admin.to_field_allowed(request, to_field):
    6464            raise DisallowedModelAdminToField("The field %s cannot be referenced." % to_field)
    6565        self.to_field = to_field
    66         self.params = dict(request.GET.items())
     66        self.params = dict(request.GET.lists())
    6767        if PAGE_VAR in self.params:
    6868            del self.params[PAGE_VAR]
    6969        if ERROR_FLAG in self.params:
Back to Top