Updated columns
authorThierry Florac <thierry.florac@onf.fr>
Wed, 30 May 2018 17:07:51 +0200
changeset 573 7bb069888657
parent 572 0d59b87b68c4
child 574 1c2320ddd9c6
Updated columns
src/pyams_content/component/paragraph/zmi/keynumber.py
--- a/src/pyams_content/component/paragraph/zmi/keynumber.py	Wed May 30 17:07:35 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/keynumber.py	Wed May 30 17:07:51 2018 +0200
@@ -252,6 +252,9 @@
     attrName = 'label'
     weight = 20
 
+    def getValue(self, obj):
+        return super(KeyNumbersTableLabelColumn, self).getValue(obj) or '--'
+
 
 @adapter_config(name='text', context=(IKeyNumberContainerTarget, IPyAMSLayer, KeyNumbersTable), provides=IColumn)
 class KeyNumbersTableTextColumn(I18nColumn, I18nAttrColumn):
@@ -261,6 +264,9 @@
     attrName = 'text'
     weight = 30
 
+    def getValue(self, obj):
+        return super(KeyNumbersTableTextColumn, self).getValue(obj) or '--'
+
 
 @adapter_config(name='trash', context=(IKeyNumberContainerTarget, IPyAMSLayer, KeyNumbersTable), provides=IColumn)
 class KeyNumbersTableTrashColumn(ProtectedFormObjectMixin, TrashColumn):