Commit f7d06221 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type: fix accessors (WIP)

parent b949aec3
...@@ -145,8 +145,8 @@ class SetSetter(Base.Setter): ...@@ -145,8 +145,8 @@ class SetSetter(Base.Setter):
if self._item_cast is not identity: if self._item_cast is not identity:
value = [self._item_cast(v) for v in value] value = [self._item_cast(v) for v in value]
if value: if value:
list_value = getattr(instance, self._storage_id, value)
value = set(value) value = set(value)
list_value = getattr(instance, self._storage_id, None)
if list_value: if list_value:
default_value = list_value[0] default_value = list_value[0]
if default_value in value: if default_value in value:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment