[primary view] delete PrimaryView.skip_none attribute (closes #2093250)
it was already broken anyway, since introduction of reledit (a while ago)
--- 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'<table>')