[Erp5-report] r33768 nicolas - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 16 17:46:18 CET 2010
Author: nicolas
Date: Tue Mar 16 17:46:16 2010
New Revision: 33768
URL: http://svn.erp5.org?rev=33768&view=rev
Log:
len(container.objectIds()) is a coding crime
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=33768&r1=33767&r2=33768&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Tue Mar 16 17:46:16 2010
@@ -1164,7 +1164,7 @@
container.getSkinSelections())
container.manage_delObjects([object_id])
- if container.aq_parent.meta_type == 'ERP5 Catalog' and len(container.objectIds()) == 0:
+ if container.aq_parent.meta_type == 'ERP5 Catalog' and not len(container):
# We are removing a ZSQLMethod, remove the SQLCatalog if empty
container.getParentValue().manage_delObjects([container.id])
except (NotFound, KeyError, BadRequest, AttributeError):
More information about the Erp5-report
mailing list