[Erp5-report] r42933 arnaud.fontaine - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 2 14:49:48 CET 2011


Author: arnaud.fontaine
Date: Wed Feb  2 14:49:48 2011
New Revision: 42933

URL: http://svn.erp5.org?rev=42933&view=rev
Log:
Fix migration of BT Property Sheets on Zope 2.8

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=42933&r1=42932&r2=42933&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Wed Feb  2 14:49:48 2011
@@ -3623,12 +3623,13 @@ class PropertySheetTemplateItem(Document
     # Migrate all the filesystem Property Sheets of the Business
     # Template if any
     property_sheet_tool = context.getPortalObject().portal_property_sheets
+    property_sheet_id_set = set(property_sheet_tool.objectIds())
 
     for class_id in migrate_object_dict:
       # If the Property Sheet already exists in ZODB, then skip it,
       # otherwise it should not be needed anymore once the deletion
       # code of the filesystem Property Sheets is enabled
-      if class_id in property_sheet_tool:
+      if class_id in property_sheet_id_set:
         raise RuntimeError('Conflict when migrating Property Sheet %s: ' \
                            'already exists in portal_property_sheets' % \
                            class_id)



More information about the Erp5-report mailing list