Commit 4284b4cf authored by Jérome Perrin's avatar Jérome Perrin

Catch appropriate exception raised by _getOb (AttributeError instead of KeyError)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5862 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63da4a37
......@@ -1325,7 +1325,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
try:
portal_id = key.split('/')[-1]
portal_type = pt._getOb(portal_id)
except KeyError:
except AttributeError:
LOG("portal types not found : ", 100, portal_id)
continue
property_list = self._objects[key]
......@@ -1350,7 +1350,7 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
try:
portal_id = key.split('/')[-1]
portal_type = pt._getOb(portal_id)
except KeyError:
except AttributeError:
LOG("portal types not found : ", 100, portal_id)
continue
property_list = self._objects[key]
......
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