Commit 029a43a5 authored by Guillaume Michon's avatar Guillaume Michon

Corrected the acquisition value copying in accessor


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1311 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e48f25f
......@@ -229,10 +229,10 @@ class Base( CopyContainer, PortalContent, Base18, ActiveObject, ERP5PropertyMana
value = method() # We should add depends here XXXXXX
# There is also a strong risk here of infinite loop
if copy_value:
if not hasattr(self, storage_id):
if not getattr(self, storage_id, None):
# Copy the value if it does not already exist as an attribute of self
# Like in the case of orders / invoices
setattr(self, value)
setattr(self, storage_id, value)
if is_list_type:
# We must provide the first element of the acquired list
if value is None:
......
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