web/views/primary.py
changeset 10179 a328b91938b2
parent 9257 ce338133c92c
child 10187 0df931eb08de
--- a/web/views/primary.py	Mon Dec 29 12:35:34 2014 +0100
+++ b/web/views/primary.py	Thu Dec 04 11:37:10 2014 +0100
@@ -237,7 +237,9 @@
                                      rtype=rschema.type, role=role)
             else:
                 vid = dispctrl.get('vid', 'autolimited')
-                limit = defaultlimit if vid == 'autolimited' else None
+                limit = dispctrl.get('limit', defaultlimit) if vid == 'autolimited' else None
+                if limit is not None:
+                    limit += 1 # need one more so the view can check if there is more than the limit
                 rset = self._relation_rset(entity, rschema, role, dispctrl, limit=limit)
                 if not rset:
                     continue