[Erp5-report] r38634 jm - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 24 18:06:32 CEST 2010


Author: jm
Date: Fri Sep 24 18:06:31 2010
New Revision: 38634

URL: http://svn.erp5.org?rev=38634&view=rev
Log:
Do not use hasattr to test a persistent object

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=38634&r1=38633&r2=38634&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Fri Sep 24 18:06:31 2010
@@ -144,7 +144,7 @@ def _recursiveRemoveUid(obj):
   This is used to prevent unindexing real objects when we delete subobjects on
   a copy of this object.
   """
-  if hasattr(aq_base(obj), 'uid'):
+  if getattr(aq_base(obj), 'uid', _MARKER) is not _MARKER:
     obj.uid = None
   for subobj in obj.objectValues():
     _recursiveRemoveUid(subobj)




More information about the Erp5-report mailing list