[Erp5-report] r19380 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 19 10:31:35 CET 2008
Author: vincent
Date: Tue Feb 19 10:31:35 2008
New Revision: 19380
URL: http://svn.erp5.org?rev=19380&view=rev
Log:
Do not use objectIds to count the number of subobjects: it's very inefficient with btreefolders.
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=19380&r1=19379&r2=19380&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Tue Feb 19 10:31:35 2008
@@ -4524,7 +4524,7 @@
# always created a trash bin because we may to save object already present
# but not in a previous business templates apart at creation of a new site
- if trash_tool is not None and (len(object_to_update) > 0 or len(self.portal_templates.objectIds()) > 1):
+ if trash_tool is not None and (len(object_to_update) > 0 or len(self.portal_templates) > 1):
trashbin = trash_tool.newTrashBin(self.getTitle(), self)
else:
trashbin = None
@@ -4579,7 +4579,7 @@
# remove trashbin if empty
if trashbin is not None:
- if len(trashbin.objectIds()) == 0:
+ if len(trashbin) == 0:
trash_tool.manage_delObjects([trashbin.getId(),])
if update_catalog:
More information about the Erp5-report
mailing list