Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…alling 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
  • Loading branch information...
commit 99150048ac1158e3978c2854bdb07bd4f2fce9fe 1 parent 0fea134
@malcolmt malcolmt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/paginator.py
View
2  django/core/paginator.py
@@ -173,7 +173,7 @@ def _get_count(self):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.