From b1ad0415da740dc10881b8d43807d6211e0ebc6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Sat, 24 Sep 2016 21:37:18 +0300 Subject: [PATCH] Fix AttributeError in Ping admin --- hc/api/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hc/api/admin.py b/hc/api/admin.py index e9e5a031..62883a34 100644 --- a/hc/api/admin.py +++ b/hc/api/admin.py @@ -103,7 +103,7 @@ class LargeTablePaginator(Paginator): Changed to use an estimate if the estimate is greater than 10,000 Returns the total number of objects, across all pages. """ - if self._count is None: + if not hasattr(self, "_count") or self._count is None: try: estimate = 0 if not self.object_list.query.where: