calculation with submulti
This commit is contained in:
parent
b76db42204
commit
af2d3eb3ce
|
@ -69,7 +69,17 @@ class Leadership(OptionDescription):
|
|||
child.impl_get_display_name()))
|
||||
if idx != 0:
|
||||
default = child.impl_getdefault()
|
||||
if default != [] and not isinstance(default, Calculation):
|
||||
if default != []:
|
||||
if child.impl_is_submulti() and isinstance(default, tuple):
|
||||
for val in default:
|
||||
if not isinstance(val, Calculation):
|
||||
calculation = False
|
||||
else:
|
||||
# empty default is valid
|
||||
calculation = True
|
||||
else:
|
||||
calculation = isinstance(default, Calculation)
|
||||
if not calculation:
|
||||
raise ValueError(_('not allowed default value for follower option "{0}" '
|
||||
'in leadership "{1}"'
|
||||
'').format(child.impl_get_display_name(),
|
||||
|
|
Loading…
Reference in New Issue