Commit 80d7d232 authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Ayush Tiwari

bt5_config: Add Business Manager portal_type also while checking for dependencies

parent 6d9e1490
...@@ -2519,8 +2519,13 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem): ...@@ -2519,8 +2519,13 @@ class PortalTypeWorkflowChainTemplateItem(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:
try:
previous_portal_type_workflow_chain_list = list(installed_bt\ previous_portal_type_workflow_chain_list = list(installed_bt\
.getTemplatePortalTypeWorkflowChainList()) .getTemplatePortalTypeWorkflowChainList())
except Exception:
# This will happen in case the `installed_bt` is Business Manager, so
# we won't need to goto the further installation process
return
else: else:
previous_portal_type_workflow_chain_list = [] previous_portal_type_workflow_chain_list = []
# We now need to setup the list of workflows corresponding to # We now need to setup the list of workflows corresponding to
......
...@@ -138,7 +138,13 @@ class TemplateTool (BaseTool): ...@@ -138,7 +138,13 @@ class TemplateTool (BaseTool):
# potential danger because business templates may exchange catalog # potential danger because business templates may exchange catalog
# methods, so the database could be broken temporarily. # methods, so the database could be broken temporarily.
last_bt = last_time = None last_bt = last_time = None
for bt in self.objectValues(portal_type=['Business Template', 'Business Package']): for bt in self.objectValues(portal_type=['Business Template',
'Business Package',
'Business Manager']):
if bt.getPortalType() == 'Business Manager':
if bt.getStatus() == 'installed':
return bt
return None
if bt.getTitle() == title or title in bt.getProvisionList(): if bt.getTitle() == title or title in bt.getProvisionList():
state = bt.getInstallationState() state = bt.getInstallationState()
if state == 'installed': if state == 'installed':
......
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