Commit 1386e210 authored by Vincent Pelletier's avatar Vincent Pelletier

Using a volatile as local variable is unsafe, since its life span can be...

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.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17284 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 685bde89
......@@ -1368,7 +1368,7 @@ class Base( CopyContainer,
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 @@ class Base( CopyContainer,
# 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 @@ class Base( CopyContainer,
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' )
......
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