[desc] fix default values for List/GroupAttribute

This commit is contained in:
Yann Lanthony 2018-07-15 11:20:43 +02:00
parent 6014c701e4
commit b6cbb0cc63

View file

@ -41,7 +41,7 @@ class ListAttribute(Attribute):
"""
self._elementDesc = elementDesc
self._joinChar = joinChar
super(ListAttribute, self).__init__(name=name, label=label, description=description, value=None, uid=(), group=group)
super(ListAttribute, self).__init__(name=name, label=label, description=description, value=[], uid=(), group=group)
elementDesc = Property(Attribute, lambda self: self._elementDesc, constant=True)
uid = Property(Variant, lambda self: self.elementDesc.uid, constant=True)
@ -61,7 +61,7 @@ class GroupAttribute(Attribute):
"""
self._groupDesc = groupDesc
self._joinChar = joinChar
super(GroupAttribute, self).__init__(name=name, label=label, description=description, value=None, uid=(), group=group)
super(GroupAttribute, self).__init__(name=name, label=label, description=description, value={}, uid=(), group=group)
groupDesc = Property(Variant, lambda self: self._groupDesc, constant=True)