branch | stable |
changeset 6290 | f68dd9dd3af2 |
parent 6288 | 17cd9ae3d2d5 |
child 6291 | f6cba3be6ba2 |
--- a/web/views/primary.py Fri Sep 17 19:30:22 2010 +0200 +++ b/web/views/primary.py Mon Sep 20 15:50:12 2010 +0200 @@ -247,7 +247,10 @@ def _relation_rset(self, entity, rschema, role, dispctrl): try: dispctrl.setdefault('limit', self.maxrelated) - rset = entity.related(rschema.type, role, limit=dispctrl['limit']+1) + limit = dispctrl['limit'] + if limit is not None: + limit += 1 + rset = entity.related(rschema.type, role, limit=limit) except Unauthorized: return if 'filter' in dispctrl: