cleanup stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 01 Apr 2010 07:38:22 +0200
branchstable
changeset 183 f720e4f589b0
parent 182 b0b42cfa25e3
child 184 c4013c0b4b8b
child 185 3cb7432a4e46
cleanup
views/secondary.py
--- a/views/secondary.py	Thu Apr 01 07:38:14 2010 +0200
+++ b/views/secondary.py	Thu Apr 01 07:38:22 2010 +0200
@@ -229,7 +229,8 @@
         _ = lambda ertype, form='': display_name(self._cw, ertype, form)
         reldata = []
         w = reldata.append
-        if 'comments' in self._cw.vreg.schema and 'BlogEntry' in self._cw.vreg.schema.rschema('comments').objects():
+        if 'comments' in self._cw.vreg.schema and \
+               'BlogEntry' in self._cw.vreg.schema.rschema('comments').objects():
             count = self._cw.execute('Any COUNT(C) WHERE C comments B, B eid %(x)s',
                                      {'x': entity.eid}, 'x')[0][0]
             if count:
@@ -237,7 +238,8 @@
                 w(u'<a href="%s">%s %s</a>' % (url, count, _('Comment', 'plural')))
             else:
                 w(u'%s %s' % (count, _('Comment')))
-        if 'tags' in self._cw.vreg.schema and 'BlogEntry' in self._cw.vreg.schema.rschema('tags').objects():
+        if 'tags' in self._cw.vreg.schema and \
+               'BlogEntry' in self._cw.vreg.schema.rschema('tags').objects():
             tag_rset = entity.related('tags', 'object')
             if tag_rset:
                 w(u'%s %s' % (_('tags', 'object'), self._cw.view('csv', tag_rset)))
@@ -254,6 +256,7 @@
     def index_display(self, start, stop):
         return u'%s' % (int(start / self.page_size)+1)
 
+
 # WFHistoryView ###############################################################
 
 class BlogEntryWFHistoryVComponent(workflow.WFHistoryVComponent):