X-Git-Url: https://git.mdrn.pl/django-pagination.git/blobdiff_plain/abf535d21fd19b257e5d6fecfd60e470cc12de7f..refs/heads/master:/fnp_django_pagination/paginator.py?ds=inline diff --git a/fnp_django_pagination/paginator.py b/fnp_django_pagination/paginator.py index cd3a0f7..d5bf2d2 100644 --- a/fnp_django_pagination/paginator.py +++ b/fnp_django_pagination/paginator.py @@ -48,7 +48,11 @@ class InfinitePaginator(Paginator): super(InfinitePaginator, self).__init__(object_list, per_page, orphans, allow_empty_first_page) # no count or num pages - del self._num_pages, self._count + try: + del self._num_pages, self._count + except AttributeError: + # These are just cached properties anyway. + pass # bonus links self.link_template = link_template