Commit b7c3b044 authored by Alex Gaynor's avatar Alex Gaynor Committed by Alex Gaynor
Browse files

Cleaned up the implementation of in_bulk

parent e57338f2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -498,9 +498,7 @@ class QuerySet(object):
                "Cannot use 'limit' or 'offset' with in_bulk"
        if not id_list:
            return {}
        qs = self._clone()
        qs.query.add_filter(('pk__in', id_list))
        qs.query.clear_ordering(force_empty=True)
        qs = self.filter(pk__in=id_list).order_by()
        return dict([(obj._get_pk_val(), obj) for obj in qs])

    def delete(self):