FIX DB: get non existent actions
This commit is contained in:
parent
d525fbf20a
commit
1d911caa9c
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ class EventModel(object):
|
|||
|
||||
def get_actions_by_alarm(self, alarm):
|
||||
for action_id in alarm.get('actions', []):
|
||||
yield self.get_action_by_id(action_id)
|
||||
action = self.get_action_by_id(action_id)
|
||||
if action is None: continue
|
||||
yield action
|
||||
|
||||
def get_all_alarms(self):
|
||||
return self.alarms.all()
|
||||
|
|
Loading…
Reference in a new issue