Commit bbfdb36b authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.2.X] Fixed #15116 -- Strip ordering clause from in_bulk() queries, since...

[1.2.X] Fixed #15116 -- Strip ordering clause from in_bulk() queries, since ordering information will be lost. Thanks to lamby for the report and patch.

Backport of r15457 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 27e7fcba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -417,6 +417,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):