Browse Source

Fixed crash on list widget

Ralfp 12 years ago
parent
commit
d2f91914d7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      misago/apps/admin/widgets.py

+ 3 - 0
misago/apps/admin/widgets.py

@@ -209,6 +209,9 @@ class ListWidget(BaseWidget):
         return reverse(self.admin.get_action_attr(self.id, 'route'), kwargs={'page': page})
 
     def get_pagination(self, total, page):
+        if not self.pagination or total < 0:
+            # Dont do anything if we are not paging
+            return None
         return make_pagination(page, total, self.pagination)
 
     def get_items(self):