[primary] fix autolimited view which was not limited at all
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 13 Oct 2010 16:16:48 +0200
changeset 6476 de7f53cf75ec
parent 6475 e58e08069c68
child 6477 a91f3541b3dd
[primary] fix autolimited view which was not limited at all
web/views/primary.py
--- a/web/views/primary.py	Wed Oct 13 16:00:06 2010 +0200
+++ b/web/views/primary.py	Wed Oct 13 16:16:48 2010 +0200
@@ -332,15 +332,15 @@
         # else show links to display related entities
         else:
             rql = self.cw_rset.printable_rql()
-            self.cw_rset.limit(limit) # remove extra entity
+            rset = self.cw_rset.limit(limit) # remove extra entity
             if list_limit is None:
-                self.wview('csv', self.cw_rset, subvid=subvid)
+                self.wview('csv', rset, subvid=subvid)
                 self.w(u'[<a href="%s">%s</a>]' % (
                     xml_escape(self._cw.build_url(rql=rql, vid=subvid)),
                     self._cw._('see them all')))
             else:
                 self.w(u'<div>')
-                self.wview('simplelist', self.cw_rset, subvid=subvid)
+                self.wview('simplelist', rset, subvid=subvid)
                 self.w(u'[<a href="%s">%s</a>]' % (
                     xml_escape(self._cw.build_url(rql=rql, vid=subvid)),
                     self._cw._('see them all')))