From 4855fd6b16eabdb70ffb26d2da14caa616fbd433 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Sun, 29 May 2011 10:31:21 +0000
Subject: [PATCH] Do not acquire guid.

Found by random code reading.
---
 product/ERP5Type/Base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index 56ce2a80fc..cb368966ae 100644
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -2855,7 +2855,7 @@ class Base( CopyContainer,
      full dns name + portal_name + uid + random
      the guid should be defined only one time for each object
     """
-    if not hasattr(self, 'guid'):
+    if self.getGuid() is None:
       guid = ''
       # Set the dns name
       guid += gethostbyaddr(gethostname())[0]
@@ -2869,7 +2869,7 @@ class Base( CopyContainer,
     """
     Get the global and unique id
     """
-    return getattr(self,'guid',None)
+    return getattr(aq_base(self), 'guid', None)
 
   # Type Casting
   def _getTypeBasedMethod(self, method_id, fallback_script_id=None,
-- 
2.30.9