# HG changeset patch # User Alexandre Richardson # Date 1328864851 -3600 # Node ID f5f874d8a4f4ce3a55b9e4f5f0b02c71b2071c42 # Parent 14c52c5ee706975275601baf3c292f441b3d8484 [primary view] delete PrimaryView.skip_none attribute (closes #2093250) it was already broken anyway, since introduction of reledit (a while ago) diff -r 14c52c5ee706 -r f5f874d8a4f4 web/views/primary.py --- a/web/views/primary.py Fri Feb 10 10:06:19 2012 +0100 +++ b/web/views/primary.py Fri Feb 10 10:07:31 2012 +0100 @@ -82,9 +82,6 @@ Renders the relation label next to the relation value if set to `True`. Otherwise, does only display the relation value. - :attr:`skip_none` - Does not render an attribute value that is None if set to `True`. - :attr:`main_related_section` Renders the relations of the entity if set to `True`. @@ -99,7 +96,6 @@ title = _('primary') show_attr_label = True show_rel_label = True - skip_none = True rsection = uicfg.primaryview_section display_ctrl = uicfg.primaryview_display_ctrl main_related_section = True @@ -194,9 +190,7 @@ return u'' def render_entity_attributes(self, entity): - """Renders all attributes and relations in the 'attributes' section. The - :attr:`skip_none` attribute controls the display of `None` valued - attributes. + """Renders all attributes and relations in the 'attributes' section. """ display_attributes = [] for rschema, _, role, dispctrl in self._section_def(entity, 'attributes'): @@ -210,7 +204,7 @@ value = self._cw.view(vid, rset) else: value = None - if not self.skip_none or (value is not None and value != ''): + if value is not None and value != '': display_attributes.append( (rschema, role, dispctrl, value) ) if display_attributes: self.w(u'')