Commit ea5935c5 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not fail if ActiveResult instance has no "result" property (it does not by...

Do not fail if ActiveResult instance has no "result" property (it does not by default, so this code breaks existing alarms' display).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20189 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5385a1b3
...@@ -362,7 +362,7 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -362,7 +362,7 @@ class Alarm(XMLObject, PeriodicityMixin):
if result.severity > result.INFO: if result.severity > result.INFO:
return True return True
# This is the default case # This is the default case
if getattr(result, 'result'): if getattr(result, 'result', False):
return True return True
return False return False
......
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