diff --git a/product/ERP5Type/Accessor/TypeDefinition.py b/product/ERP5Type/Accessor/TypeDefinition.py index 2f02f3539444585d71df804fa432eb103b6bcf19..d63920dfc8d3488a0623b8148fa5a0aadcc8552d 100644 --- a/product/ERP5Type/Accessor/TypeDefinition.py +++ b/product/ERP5Type/Accessor/TypeDefinition.py @@ -101,9 +101,9 @@ def asList(value): """ Return the value as a list or a type-specific default value if it fails. """ - if type(value) in (type([]), type(())): + if isinstance(value, (list, tuple)): result = list(value) - elif type(value) is type('a'): + elif isinstance(value, str): result = value.split() else: result = [value]