Commit a3230950 authored by Julien Muchembled's avatar Julien Muchembled

Really fix alarms wrt ActiveResult cleanup

cf commit b9ceb45e
parent f677ab02
...@@ -37,7 +37,6 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -37,7 +37,6 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Security.ERP5UserManager import SUPER_USER from Products.ERP5Security.ERP5UserManager import SUPER_USER
from Products.ERP5.mixin.periodicity import PeriodicityMixin from Products.ERP5.mixin.periodicity import PeriodicityMixin
from zLOG import INFO
class Alarm(XMLObject, PeriodicityMixin): class Alarm(XMLObject, PeriodicityMixin):
""" """
...@@ -204,7 +203,7 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -204,7 +203,7 @@ class Alarm(XMLObject, PeriodicityMixin):
# active process but no method_id is defined # active process but no method_id is defined
for result in process.getResultList(): for result in process.getResultList():
# This is useful is result is returned as a Return instance # This is useful is result is returned as a Return instance
if result.severity > INFO: if result.isError():
return True return True
# This is the default case # This is the default case
if getattr(result, 'result', False): if getattr(result, 'result', False):
......
...@@ -56,7 +56,7 @@ for result in context.getResultList():\n ...@@ -56,7 +56,7 @@ for result in context.getResultList():\n
if result is None:\n if result is None:\n
continue # Workaround for bogus results\n continue # Workaround for bogus results\n
# This is useful is result is returned as a Return instance\n # This is useful is result is returned as a Return instance\n
if result.severity > result.INFO:\n if result.isError():\n
return True\n return True\n
# This is the default case\n # This is the default case\n
if getattr(result, \'result\', False):\n if getattr(result, \'result\', False):\n
......
40972 40973
\ No newline at end of file \ 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