From 1386e210ab89e198f50ce2deb8480d0d2cbb6292 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Tue, 30 Oct 2007 09:12:57 +0000
Subject: [PATCH] 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
---
 product/ERP5Type/Base.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index d31a2525ea..f49a9c4257 100644
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -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' )
-- 
2.30.9