Commit c4a4ee2a authored by Yusei Tahara's avatar Yusei Tahara

BusinessTemplate: Installed business template may be empty. Don't assume that it is not empty.

parent 38cb674a
...@@ -2782,8 +2782,11 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem): ...@@ -2782,8 +2782,11 @@ class PortalTypeAllowedContentTypeTemplateItem(BaseTemplateItem):
force = kw.get('force') force = kw.get('force')
installed_bt = kw.get('installed_bt') installed_bt = kw.get('installed_bt')
if installed_bt is not None: if installed_bt is not None:
old_objects = getattr(installed_bt, item = getattr(installed_bt, self.business_template_class_property, None)
self.business_template_class_property)._objects if item is not None:
old_objects = item._objects
else:
old_objects = {}
else: else:
old_objects = {} old_objects = {}
for key in set(self._objects.keys()).union(old_objects.keys()): for key in set(self._objects.keys()).union(old_objects.keys()):
......
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