Commits

bbangert  committed 37fbc9c

[svn] If the result set is completely empty, now properly supports current/last page attributes

  • Participants
  • Parent commits f4f7d66
  • Tags 0.1

Comments (0)

Files changed (1)

File webhelpers/pagination/__init__.py

         if index < 0:
             index = len(self) + index
         
-        if index not in self:
+        if index < 0:
+            index = 0
+        
+        if index not in self and index != 0:
             raise IndexError, "list index out of range"
         
         return self.pages.setdefault(index, Page(self, index))