Skip to content
Snippets Groups Projects
Commit 3aff9c63 authored by Brian Moe's avatar Brian Moe
Browse files

Bug fix. Custom alerts with wildcard analysis type did not work.

parent f84f26c7
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,9 @@ def issueAlertForLabel(event, label, doxmpp):
# Email
profileRecips = []
atype = AnalysisType.objects.filter(code=event.analysisType)[0]
# Triggers on given label matching analysis type OR with no atype (wildcard type)
triggers = label.trigger_set.filter(atypes=atype)
triggers = triggers | label.trigger_set.filter(atypes=None)
for trigger in triggers:
for recip in trigger.contacts.all():
profileRecips.append(recip.email)
......
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