diff --git a/product/ERP5Type/Accessor/Value.py b/product/ERP5Type/Accessor/Value.py index 7a4f3db04c6cc42c3d2f467690fdefee6e23c3f0..359df5a6e5f4ee0f073f724fd408bfcc1541fe20 100644 --- a/product/ERP5Type/Accessor/Value.py +++ b/product/ERP5Type/Accessor/Value.py @@ -48,7 +48,8 @@ class SetSetter(BaseSetter): def __call__(self, instance, *args, **kw): if self._warning: LOG("ERP5Type Deprecated Setter Id:",0, self._id) - instance._setValue(self._key, args[0], + value = set(args[0]) + instance._setValue(self._key, value, spec=kw.get('spec',()), filter=kw.get('filter', None), portal_type=kw.get('portal_type',()), diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 859bf9606eec9d80ee2ff01a1a313d22469a00c4..cf74e8a402a6f47c91b2e9d6f1ca119af83d91da 100644 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -2004,7 +2004,7 @@ class Base( CopyContainer, # We have been provided a string path = target if path.startswith(start_string): path = path[start_string_len:] # Prevent duplicating base category - elif isinstance(target, (tuple, list)): + elif isinstance(target, (tuple, list, set, frozenset)): # We have been provided a list or tuple path_list = [] for target_item in target: diff --git a/product/ERP5Type/tests/testERP5Type.py b/product/ERP5Type/tests/testERP5Type.py index cb102391ffb2d73f1461ea692c9f45bb437a6c39..adab7c8dacdce33091cd162b4926fe9b6b692245 100644 --- a/product/ERP5Type/tests/testERP5Type.py +++ b/product/ERP5Type/tests/testERP5Type.py @@ -675,6 +675,7 @@ class TestPropertySheet: person.setRegionValueList([alpha, alpha]) self.assertEquals(person.getRegionList(), ['alpha', 'alpha']) person.setRegionValueSet([alpha, alpha]) + self.assertEquals(person.getRegionList(), ['alpha']) self.assertEquals(person.getRegionSet(), ['alpha']) person.setRegionValueList([alpha, beta, alpha]) self.assertEquals(person.getRegionList(), ['alpha', 'beta', 'alpha'])