Commit dcade766 authored by Romain Courteaud's avatar Romain Courteaud

BusinessTemplate: XXX workaround one issue with web section handling

XXX Not tested...
parent 8f0ddbd6
...@@ -1495,7 +1495,7 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -1495,7 +1495,7 @@ class ObjectTemplateItem(BaseTemplateItem):
subobject_data.seek(0) subobject_data.seek(0)
subobject = connection.importFile(subobject_data) subobject = connection.importFile(subobject_data)
obj._setObject(subobject_id, subobject) obj._setObject(subobject_id, subobject)
except AttributeError: except (AttributeError, KeyError):
# XXX this may happen when an object which can contain # XXX this may happen when an object which can contain
# sub-objects (e.g. ERP5 Form) has been replaced with # sub-objects (e.g. ERP5 Form) has been replaced with
# an object which cannot (e.g. External Method). # an object which cannot (e.g. External Method).
...@@ -1690,7 +1690,7 @@ class PathTemplateItem(ObjectTemplateItem): ...@@ -1690,7 +1690,7 @@ class PathTemplateItem(ObjectTemplateItem):
for path in sorted(object_keys, reverse=True): for path in sorted(object_keys, reverse=True):
try: try:
path_list = self._resolvePath(p, [], path.split('/')) path_list = self._resolvePath(p, [], path.split('/'))
except AttributeError: except (AttributeError, KeyError):
# path seems to not exist anymore # path seems to not exist anymore
continue continue
path_list.sort() path_list.sort()
......
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