diff --git a/src/rougail/annotator/value.py b/src/rougail/annotator/value.py index aeec99b54..6bfda4326 100644 --- a/src/rougail/annotator/value.py +++ b/src/rougail/annotator/value.py @@ -74,9 +74,19 @@ class Annotator(Walk): # pylint: disable=R0903 if multi is False and variable.type is None: if type(variable.default) in basic_types: variable.type = basic_types[type(variable.default)] - else: + elif isinstance(variable.default, list): + #if variable.name == "varname23": + # print("IIIIIIIIIIIIIIIIIIIIIIIIIIIII") + # print(variable.multi) + if variable.multi is None or variable.multi is False: + variable.multi = True if variable.type is None: - variable.type = "string" + variable.type = basic_types[type(variable.default[0])] + #if variable.name == "varname23": + # print(variable.multi) + # print(variable.type) + else: + variable.type = "string" # a boolean must have value, the default value is "True" if variable.type == "boolean" and multi is False and variable.default is None: @@ -89,9 +99,9 @@ class Annotator(Walk): # pylint: disable=R0903 pass # variable.default = variable.default.to_function(self.functions) elif isinstance(variable.default, list): - if not multi: + if not multi and variable.version == "1.0": raise Exception( - f'The variable "{variable.path}" with a list has default value must have "multi" attribute' + f'The variable "{variable.path}" with a list as default value must have "multi" attribute' ) if variable.path in self.objectspace.followers: if multi != "submulti" and len(variable.default) != 1: