# HG changeset patch # User Sylvain Thénault <sylvain.thenault@logilab.fr> # Date 1295278772 -3600 # Mon Jan 17 16:39:32 2011 +0100 # Branch stable # Node ID 95dedf5cb317dd1c5b00919a4ed66add07b7cf01 # Parent c775ff4e2b1d4fce82b7b3e6680191fc47c07e5d one more bug fixed diff --git a/views.py b/views.py --- a/views.py +++ b/views.py @@ -328,13 +328,12 @@ __regid__ = 'latestcomments' def render_body(self, w): - user = self.cw_rset.get_entity(row, col) maxrelated = self._cw.property_value('navigation.related-limit') + 1 rset = self._cw.execute( 'Any C,CD,C,CCF ORDERBY CD DESC LIMIT %s WHERE C is Comment, ' 'C creation_date CD, C content CC, C content_format CCF, ' 'C created_by U, U eid %%(u)s' % maxrelated, - {'u': user.eid}) + {'u': self.entity.eid}) if rset: w(u'<div class="section">') w(u'<h4>%s</h4>\n' % self._cw._('Latest comments').capitalize())