Check if notification policies is empty
This commit is contained in:
parent
15c2070898
commit
c26158ba9d
1 changed files with 5 additions and 3 deletions
|
|
@ -62,12 +62,14 @@ def notify_group_task(alert_group_pk, escalation_policy_snapshot_order=None):
|
|||
user=user,
|
||||
important=escalation_policy_step == EscalationPolicy.STEP_NOTIFY_GROUP_IMPORTANT,
|
||||
)
|
||||
usergroup_notification_plan += "\n_{} (".format(
|
||||
step.get_user_notification_message_for_thread_for_usergroup(user, notification_policies.first())
|
||||
)
|
||||
|
||||
notification_channels = []
|
||||
if notification_policies.filter(step=UserNotificationPolicy.Step.NOTIFY).count() == 0:
|
||||
usergroup_notification_plan += "Empty notifications"
|
||||
else:
|
||||
usergroup_notification_plan += "\n_{} (".format(
|
||||
step.get_user_notification_message_for_thread_for_usergroup(user, notification_policies.first())
|
||||
)
|
||||
for notification_policy in notification_policies:
|
||||
if notification_policy.step == UserNotificationPolicy.Step.NOTIFY:
|
||||
notification_channels.append(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue