[Erp5-report] r41762 nicolas - /erp5/trunk/products/ERP5Type/Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 24 17:15:05 CET 2010
Author: nicolas
Date: Fri Dec 24 17:15:04 2010
New Revision: 41762
URL: http://svn.erp5.org?rev=41762&view=rev
Log:
Fix behaviour of acquisition_mask_value argument in Accessors.
Policy is return non null local_value even if acquisition lookups fails
when acquisition_mask_value is False.
Modified:
erp5/trunk/products/ERP5Type/Base.py
Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=41762&r1=41761&r2=41762&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Fri Dec 24 17:15:04 2010
@@ -1111,6 +1111,7 @@ class Base( CopyContainer,
value = getattr(self, storage_id, None)
else:
value = None
+ local_value = value
# If we hold an attribute and mask_value is set, return the attribute
if mask_value and value not in null_value:
# Pop context
@@ -1216,6 +1217,11 @@ class Base( CopyContainer,
result = None
if result not in null_value:
return result
+ elif local_value not in null_value:
+ # Nothing has been found by looking up
+ # through acquisition documents, fallback by returning
+ # at least local_value
+ return local_value
else:
#LOG("alt_accessor_id",0,str(alt_accessor_id))
if alt_accessor_id is not None:
More information about the Erp5-report
mailing list