diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 0dce904789bda4c4ab60cfb9129131a38b5aaf48..ac0354f6e203340089c0b0348d750582982451d0 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -2335,11 +2335,13 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): if action == 'nothing': continue portal_id = key.split('/')[-1] + property_list = self._objects.get(key, []) type_information = types_tool.getTypeInfo(portal_id) if type_information is None: + if not property_list: + 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(type_information, self.class_property, ()) # merge differences between portal types properties