[Erp5-report] r13562 - /erp5/trunk/products/ERP5Type/Accessor/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 22 15:23:36 CET 2007


Author: romain
Date: Thu Mar 22 15:23:33 2007
New Revision: 13562

URL: http://svn.erp5.org?rev=13562&view=rev
Log:
None may not be always considered as a NULL value of property, so it's better to take a default NULL value from _null.
Value is considered a NULL if inside _null.

Modified:
    erp5/trunk/products/ERP5Type/Accessor/Base.py

Modified: erp5/trunk/products/ERP5Type/Accessor/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Accessor/Base.py?rev=13562&r1=13561&r2=13562&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Accessor/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Accessor/Base.py Thu Mar 22 15:23:33 2007
@@ -143,8 +143,9 @@
         default = args[0]
       else:
         default = self._default
-      value = getattr(aq_base(instance), self._storage_id, None) # No acquisition on properties
-      if value is not None:
+      # No acquisition on properties
+      value = getattr(aq_base(instance), self._storage_id, self._null[0])
+      if value not in self._null:
         if self._is_tales_type and kw.get('evaluate', 1):
           return evaluateTales(instance, value)
         else:




More information about the Erp5-report mailing list