Commit cac06a88 authored by Julien Muchembled's avatar Julien Muchembled

BusinessTemplate: fix removal of allowed types on already removed portal types

parent 30470464
...@@ -2335,11 +2335,13 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): ...@@ -2335,11 +2335,13 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
if action == 'nothing': if action == 'nothing':
continue continue
portal_id = key.split('/')[-1] portal_id = key.split('/')[-1]
property_list = self._objects.get(key, [])
type_information = types_tool.getTypeInfo(portal_id) type_information = types_tool.getTypeInfo(portal_id)
if type_information is None: if type_information is None:
if not property_list:
continue
raise AttributeError, "Portal type '%s' not found while " \ raise AttributeError, "Portal type '%s' not found while " \
"installing %s" % (portal_id, self.getTitle()) "installing %s" % (portal_id, self.getTitle())
property_list = self._objects.get(key, [])
old_property_list = old_objects.get(key, ()) old_property_list = old_objects.get(key, ())
object_property_list = getattr(type_information, self.class_property, ()) object_property_list = getattr(type_information, self.class_property, ())
# merge differences between portal types properties # merge differences between portal types properties
......
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