mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
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
This commit is contained in:
parent
0fea1348d6
commit
99150048ac
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user