Commit 7482f492 authored by Nicolas Delaby's avatar Nicolas Delaby

len(container.objectIds()) is a coding crime

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33768 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cdbf2463
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment