support submulti with follower
This commit is contained in:
@ -385,18 +385,21 @@ class Variable(Common):
|
||||
if 'default' not in self.attrib:
|
||||
self.attrib['default'] = []
|
||||
value = convert_tiramisu_value(child.text, type_)
|
||||
if not isinstance(value, list) and not is_follower:
|
||||
value = [value]
|
||||
self.attrib['default'].append(value)
|
||||
if 'default_multi' not in self.attrib and not is_leader:
|
||||
self.attrib['default_multi'] = value
|
||||
if not is_follower:
|
||||
if not isinstance(value, list):
|
||||
dvalue = [value]
|
||||
else:
|
||||
dvalue = value
|
||||
self.attrib['default'].append(dvalue)
|
||||
if value and 'default_multi' not in self.attrib and not is_leader:
|
||||
self.attrib['default_multi'] = []
|
||||
if not is_leader:
|
||||
self.attrib['default_multi'].append(value)
|
||||
else:
|
||||
if 'default' in self.attrib:
|
||||
raise CreoleLoaderError(_('default value already set for {}'
|
||||
'').format(self.attrib['path']))
|
||||
value = convert_tiramisu_value(child.text, type_)
|
||||
if value is None: # and (elt.attrib['type'] != 'choice' or value not in self.attrib['values']):
|
||||
value = u''
|
||||
if is_follower:
|
||||
self.attrib['default_multi'] = value
|
||||
else:
|
||||
|
Reference in New Issue
Block a user