simplify generator lookup logic on BusinessTemplates

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30822 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bd01de54
......@@ -5073,12 +5073,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
self.checkDependencies()
site = self.getPortalObject()
custom_generator_class = getattr(site, '_generator_class', None)
if custom_generator_class is not None:
gen = custom_generator_class()
else:
from Products.ERP5.ERP5Site import ERP5Generator
gen = ERP5Generator()
generator_class = getattr(site, '_generator_class', ERP5Generator)
gen = generator_class()
# update activity tool first if necessary
if self.getTitle() == 'erp5_core' and self.getTemplateUpdateTool():
LOG('Business Template', 0, 'Updating Activity Tool')
......
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