chore: more pythonic code
[skip ci]
This commit is contained in:
parent
1eabd21bb8
commit
2eca7b4837
1 changed files with 5 additions and 3 deletions
|
|
@ -967,9 +967,11 @@ class Document(BaseDocument):
|
|||
return
|
||||
|
||||
def _evaluate_alert(alert):
|
||||
if not alert.name in self.flags.notifications_executed:
|
||||
evaluate_alert(self, alert.name, alert.event)
|
||||
self.flags.notifications_executed.append(alert.name)
|
||||
if alert.name in self.flags.notifications_executed:
|
||||
return
|
||||
|
||||
evaluate_alert(self, alert.name, alert.event)
|
||||
self.flags.notifications_executed.append(alert.name)
|
||||
|
||||
event_map = {
|
||||
"on_update": "Save",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue