web/component.py
changeset 3629 559cad62c786
parent 3468 b02fa4db2868
parent 3607 a7c5e62c7e00
child 3777 3ef8cdb5fb1c
--- a/web/component.py	Wed Oct 07 12:38:30 2009 +0200
+++ b/web/component.py	Fri Oct 09 16:39:26 2009 +0200
@@ -104,6 +104,8 @@
             start = int(self._cw.form[self.start_param])
         except KeyError:
             start, stop = 0, self.page_size
+        if start >= len(self.rset):
+            start, stop = 0, self.page_size
         self.starting_from = start
         return start, stop