Commit 3ed34d15 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Add getInstalledBusinessManager for BM

parent 389791c3
......@@ -168,6 +168,22 @@ class TemplateTool (BaseTool):
last_time = t
return last_bt
security.declareProtected(Permissions.AccessContentsInformation,
'getInstalledBusinessManager')
def getInstalledBusinessManager(self, title, strict=False, **kw):
"""Returns an installed version of business manager of given title.
Returns None if business manager is not installed or has been uninstalled.
"""
last_bm = None
for bm in self.objectValues(portal_type='Business Manager'):
if bm.getTitle() == title:
state = bm.getInstallationState()
if state == 'installed':
return bm
return last_bm
security.declareProtected(Permissions.AccessContentsInformation,
'getInstalledBusinessTemplatesList')
def getInstalledBusinessTemplatesList(self):
......
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