Commit 7ce4f9e0 authored by Vincent Pelletier's avatar Vincent Pelletier

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
parent 210cb8a7
......@@ -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
......
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