summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-02-08 14:05:38 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-02-08 14:05:38 +0000
commit340eaded4e30cf25bcd4e9781d33a617fe9c0f84 (patch)
tree530af60b5c5fff7ce754a0a25e9ce0d32176efdf /django/db
parent4e7c2ba1d7318d60cd371b98bf2afbaebd68acd5 (diff)
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
Diffstat (limited to 'django/db')
-rw-r--r--django/db/models/query.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 3c43a57d4a..fa3971bc48 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -419,6 +419,7 @@ class QuerySet(object):
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):