Commit e9740772 authored by Julien Muchembled's avatar Julien Muchembled

erp5_dms/template_portal_type_allowed_content_type_list refers to missing portal type

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29273 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 907e7dc0
......@@ -1957,7 +1957,12 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
action = update_dict[key]
if action == 'nothing':
continue
portal_type = pt._getOb(key.split('/')[-1])
try:
portal_id = key.split('/')[-1]
portal_type = pt._getOb(portal_id)
except (AttributeError, KeyError):
LOG("portal types not found : ", 100, portal_id)
continue
property_list = self._objects.get(key, [])
old_property_list = old_objects.get(key, ())
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