Skip to content
Snippets Groups Projects
Commit b4a41aa5 authored by David Baker's avatar David Baker
Browse files

Don't add notifications to the table unless there's actually a 'notify' action

parent 74f49f99
No related branches found
No related tags found
No related merge requests found
...@@ -135,8 +135,16 @@ class BulkPushRuleEvaluator: ...@@ -135,8 +135,16 @@ class BulkPushRuleEvaluator:
evaluator, rule['conditions'], uid, display_name, condition_cache evaluator, rule['conditions'], uid, display_name, condition_cache
) )
if matches: if matches:
notify = False
actions = []
for a in rule['actions']:
if a != 'dont_notify':
actions.append(a)
elif a == 'notify':
notify = True
actions = [x for x in rule['actions'] if x != 'dont_notify'] actions = [x for x in rule['actions'] if x != 'dont_notify']
if actions: if actions and notify:
actions_by_user[uid] = actions actions_by_user[uid] = actions
break break
defer.returnValue(actions_by_user) defer.returnValue(actions_by_user)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment