From c309ec08249dbffa830c14b7620d56710c224b29 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Tue, 5 Sep 2017 18:47:11 +0500 Subject: [PATCH] Simplified admin.widgets.url_params_from_lookup_dict(). --- django/contrib/admin/widgets.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 7cf71bb6ce..0f5f3c7dab 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -120,7 +120,6 @@ def url_params_from_lookup_dict(lookups): """ params = {} if lookups and hasattr(lookups, 'items'): - items = [] for k, v in lookups.items(): if callable(v): v = v() @@ -130,8 +129,7 @@ def url_params_from_lookup_dict(lookups): v = ('0', '1')[v] else: v = str(v) - items.append((k, v)) - params.update(dict(items)) + params[k] = v return params