mirror of
https://github.com/django/django.git
synced 2025-08-22 19:44:44 +00:00
Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
This commit is contained in:
parent
f19a3669b8
commit
c7d0ff0cad
23 changed files with 38 additions and 38 deletions
|
@ -534,7 +534,7 @@ class QuerySet(object):
|
|||
if not id_list:
|
||||
return {}
|
||||
qs = self.filter(pk__in=id_list).order_by()
|
||||
return dict([(obj._get_pk_val(), obj) for obj in qs])
|
||||
return dict((obj._get_pk_val(), obj) for obj in qs)
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue