From 6ec9932f4de56879d2e7cb58c61159e3837d1a4f Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Fri, 25 Sep 2009 13:09:47 +0000 Subject: [PATCH] Explicitely raise an error if a portal type is not found when business template should add new property on it. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29183 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 51b601f0b7..43a1600dba 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -1982,8 +1982,8 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): portal_id = key.split('/')[-1] portal_type = pt._getOb(portal_id) except AttributeError: - LOG("portal types not found : ", 100, portal_id) - continue + raise AttributeError, "Portal type '%s' not found while " \ + "installing %s" % (portal_id, self.getTitle()) property_list = self._objects.get(key, []) old_property_list = old_objects.get(key, ()) object_property_list = getattr(portal_type, self.class_property, ()) -- 2.30.9