Commit a32aac50 authored by Ivan Tyagov's avatar Ivan Tyagov

Prevent needless failures by trying to execute an alarm which is not

enabled.
parent e1209b39
......@@ -53,8 +53,13 @@
<value> <string>portal = state_change[\'object\'].getPortalObject()\n
tag = \'%s_reindex\' % state_change[\'object\'].getRelativeUrl()\n
activate_kw = {\'tag\': tag} \n
state_change[\'object\'].reindexObject(activate_kw=activate_kw) \n
portal.portal_alarms.accept_submitted_credentials.activate(activity=\'SQLDict\', after_tag=tag).activeSense()\n
state_change[\'object\'].reindexObject(activate_kw=activate_kw)\n
\n
# call alarm to speed up account creation process\n
# only if alarm is enabled\n
alarm = portal.portal_alarms.accept_submitted_credentials\n
if alarm.isEnabled():\n
alarm.activate(activity=\'SQLDict\', after_tag=tag).activeSense()\n
</string> </value>
</item>
<item>
......
408
\ No newline at end of file
409
\ No newline at end of file
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