mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user