Commit bfe985f4 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Do not perform bt5 migration to ZODB if the tool is not available.

At the moment, erp5_core_component is distinct from erp5_core and thus
it fails if migration is attempted before erp5_core_component is
installed.
parent 45f637be
......@@ -3659,7 +3659,12 @@ class FilesystemToZodbTemplateItem(FilesystemDocumentTemplateItem,
update_parameter_dict[key] = 'migrate'
def install(self, context, **kw):
if not self._perform_migration:
"""
Install Business Template items and perform migration
automatically only if the tool is available
"""
if (not self._perform_migration or
getattr(context.getPortalObject(), self._tool_id, None) is None):
return FilesystemDocumentTemplateItem.install(self, context, **kw)
# With format 0 of Business Template, the objects are stored in
......
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