Added columns checks
authorThierry Florac <thierry.florac@onf.fr>
Mon, 04 Jun 2018 14:43:20 +0200
changeset 574 1c2320ddd9c6
parent 573 7bb069888657
child 575 e61e7effa80a
Added columns checks
src/pyams_content/component/paragraph/zmi/milestone.py
--- a/src/pyams_content/component/paragraph/zmi/milestone.py	Wed May 30 17:07:51 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Jun 04 14:43:20 2018 +0200
@@ -247,6 +247,9 @@
     attrName = 'title'
     weight = 10
 
+    def getValue(self, obj):
+        return super(MilestonesTableNameColumn, self).getValue(obj) or '--'
+
 
 @adapter_config(name='info', context=(IMilestoneContainerTarget, IPyAMSLayer, MilestonesTable), provides=IColumn)
 class MilestonesTableInfoColumn(I18nColumn, I18nAttrColumn):
@@ -256,6 +259,9 @@
     attrName = 'label'
     weight = 20
 
+    def getValue(self, obj):
+        return super(MilestonesTableInfoColumn, self).getValue(obj) or '--'
+
 
 @adapter_config(name='anchor', context=(IMilestoneContainerTarget, IPyAMSLayer, MilestonesTable), provides=IColumn)
 class MilestonesTableAnchorColumn(I18nColumn, GetAttrColumn):