mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #15116 -- Strip ordering clause from in_bulk() queries, since ordering information will be lost. Thanks to lamby for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4e7c2ba1d7
commit
340eaded4e
@ -419,6 +419,7 @@ class QuerySet(object):
|
|||||||
return {}
|
return {}
|
||||||
qs = self._clone()
|
qs = self._clone()
|
||||||
qs.query.add_filter(('pk__in', id_list))
|
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.iterator()])
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user