[Erp5-report] r17284 - /erp5/trunk/products/ERP5Type/Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 30 10:12:57 CET 2007
Author: vincent
Date: Tue Oct 30 10:12:57 2007
New Revision: 17284
URL: http://svn.erp5.org?rev=17284&view=rev
Log:
Using a volatile as local variable is unsafe, since its life span can be shorter than local variable life span. Create the volatile for backward compatibility - even though the expected behaviour differs from reality.
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=17284&r1=17283&r2=17284&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Tue Oct 30 10:12:57 2007
@@ -1368,7 +1368,7 @@
keep_existing -- if set to 1 or True, only those properties for which
hasProperty is False will be updated.
"""
- self._v_modified_property_dict = {}
+ modified_property_dict = self._v_modified_property_dict = {}
def getModifiedPropertyList(self):
my_modified_property_list = []
@@ -1389,7 +1389,7 @@
# edit itself, this is useless as the dict will be overwritten
# If the keep_existing flag is set to 1, we do not update properties which are defined
if not keep_existing or not self.hasProperty(key):
- self._v_modified_property_dict[key] = old_value
+ modified_property_dict[key] = old_value
my_modified_property_list.append(key)
return my_modified_property_list
@@ -1413,7 +1413,7 @@
if reindex_object:
# We do not want to reindex the object if nothing is changed
- if (self._v_modified_property_dict != {}):
+ if (modified_property_dict != {}):
self.reindexObject(activate_kw=activate_kw)
security.declareProtected( Permissions.ModifyPortalContent, 'setId' )
More information about the Erp5-report
mailing list