From 7482f492b118ea24056c34bdd28c1376b1c6181f Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Tue, 16 Mar 2010 16:46:16 +0000 Subject: [PATCH] len(container.objectIds()) is a coding crime git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33768 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index b8309a6186..7e3e8d680e 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -1164,7 +1164,7 @@ class ObjectTemplateItem(BaseTemplateItem): 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): -- 2.30.9