diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-08 14:05:38 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-02-08 14:05:38 +0000 |
| commit | 340eaded4e30cf25bcd4e9781d33a617fe9c0f84 (patch) | |
| tree | 530af60b5c5fff7ce754a0a25e9ce0d32176efdf | |
| parent | 4e7c2ba1d7318d60cd371b98bf2afbaebd68acd5 (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
| -rw-r--r-- | django/db/models/query.py | 1 |
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): |
