Commit e5809026 authored by Ivan Tyagov's avatar Ivan Tyagov

Do not subscribe portal_alarms unconditionally.

In case of erp5_core business template update this code is called (with update=True argument)
and thus it will effectively override previous portal_alarms' state which
is wrong as no "general purpose" code should overwrite potential
developer configuration.
Tests passing at https://nexedi.erp5.net/test_result_module/20200324-3BC4D696 thus merging right away.

See merge request !1086
parents 280f3445 a75f30e4
Pipeline #8594 failed with stage
......@@ -2350,9 +2350,6 @@ class ERP5Generator(PortalGenerator):
self.setupTools(p, **kw)
# subscribe portal_alarms
p.portal_alarms.subscribe()
if not p.hasObject('MailHost'):
self.setupMailHost(p)
......@@ -2385,6 +2382,8 @@ class ERP5Generator(PortalGenerator):
self.setupWorkflow(p)
self.setupERP5Core(p,**kw)
self.setupERP5Promise(p,**kw)
# subscribe portal_alarms
p.portal_alarms.subscribe()
# Make sure the cache is initialized
p.portal_caches.updateCache()
......@@ -2421,7 +2420,6 @@ class ERP5Generator(PortalGenerator):
template_tool.updateRepositoryBusinessTemplateList(repository.split())
template_tool.installBusinessTemplateListFromRepository(
['erp5_promise'], activate=True, install_dependency=True)
p.portal_alarms.subscribe()
# Zope offers no mechanism to extend AppInitializer so let's monkey-patch.
......
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