Commit 6ec9932f authored by Romain Courteaud's avatar Romain Courteaud

Explicitely raise an error if a portal type is not found when business...

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
parent 9c74cf1e
...@@ -1982,8 +1982,8 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): ...@@ -1982,8 +1982,8 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
portal_id = key.split('/')[-1] portal_id = key.split('/')[-1]
portal_type = pt._getOb(portal_id) portal_type = pt._getOb(portal_id)
except AttributeError: except AttributeError:
LOG("portal types not found : ", 100, portal_id) raise AttributeError, "Portal type '%s' not found while " \
continue "installing %s" % (portal_id, self.getTitle())
property_list = self._objects.get(key, []) property_list = self._objects.get(key, [])
old_property_list = old_objects.get(key, ()) old_property_list = old_objects.get(key, ())
object_property_list = getattr(portal_type, self.class_property, ()) object_property_list = getattr(portal_type, self.class_property, ())
......
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