Commit a051a9d9 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Fixed PR 478 -- Removed superfluous try/except block.

parent a7b7efe7
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -209,12 +209,10 @@ class QuerySet(object):
                stop = None
            qs.query.set_limits(start, stop)
            return k.step and list(qs)[::k.step] or qs
        try:

        qs = self._clone()
        qs.query.set_limits(k, k + 1)
        return list(qs)[0]
        except self.model.DoesNotExist as e:
            raise IndexError(e.args)

    def __and__(self, other):
        self._merge_sanity_check(other)