From 7ce4f9e00ea2e7cbef15ba236612d1624499e709 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Mon, 24 Apr 2006 14:07:17 +0000
Subject: [PATCH] Correct a potential concurent access bug with hasattr.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6903 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Tool/IdTool.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Tool/IdTool.py b/product/ERP5/Tool/IdTool.py
index 9a730406a0..13fa4e6c15 100644
--- a/product/ERP5/Tool/IdTool.py
+++ b/product/ERP5/Tool/IdTool.py
@@ -74,7 +74,8 @@ class IdTool(UniqueObject, Folder):
     """
       Generate a new Id
     """
-    if not hasattr(self,'dict_ids'):
+    
+    if getattr(self, 'dict_ids', None) is None:
       self.dict_ids = PersistentMapping()
 
     new_id = None
-- 
2.30.9