Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #15116 -- Strip ordering clause from in_bulk() queries, since o…

…rdering information will be lost. Thanks to lamby for the report and patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 340eaded4e30cf25bcd4e9781d33a617fe9c0f84 1 parent 4e7c2ba
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  django/db/models/
1  django/db/models/
@@ -419,6 +419,7 @@ def in_bulk(self, id_list):
return {}
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()])
def delete(self):
Please sign in to comment.
Something went wrong with that request. Please try again.