mirror of
https://github.com/django/django.git
synced 2025-09-25 03:32:37 +00:00
Fixed #17668 - prefetch_related does not work in in_bulk
Thanks to gurets for the report, and akaariai for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4b641b78fa
commit
de9942a667
3 changed files with 20 additions and 1 deletions
|
@ -485,7 +485,7 @@ class QuerySet(object):
|
|||
qs = self._clone()
|
||||
qs.query.add_filter(('pk__in', id_list))
|
||||
qs.query.clear_ordering(force_empty=True)
|
||||
return dict([(obj._get_pk_val(), obj) for obj in qs.iterator()])
|
||||
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