Commit 99150048 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

Fixed a problem in the backwards-compat abilities of the paginator. Calling...

Fixed a problem in the backwards-compat abilities of the paginator. Calling count() on a list throws a TypeError not an AttributeError.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 0fea1348
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ class ObjectPaginator(Paginator):
        if self._count is None:
            try:
                self._count = self.object_list.count()
            except AttributeError:
            except TypeError:
                self._count = len(self.object_list)
        return self._count
    count = property(_get_count)