diff --git a/CHANGELOG.md b/CHANGELOG.md index 6545f14f..b028104c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## v1.0.30 (2022-08-31) +- Bug fix: check user notification policy before access + ## v1.0.29 (2022-08-31) - Add arm64 docker image @@ -82,7 +85,7 @@ ## 1.0.2 (2022-06-17) - Fix Grafana Alerting integration to handle API changes in Grafana 9 -- Improve public api endpoint for for outgoing webhooks (/actions) by adding ability to create, update and delete outgoing webhook instance +- Improve public api endpoint for outgoing webhooks (/actions) by adding ability to create, update and delete outgoing webhook instance ## 1.0.0 (2022-06-14) diff --git a/engine/apps/alerts/tasks/notify_group.py b/engine/apps/alerts/tasks/notify_group.py index 9803affb..a3de0b9f 100644 --- a/engine/apps/alerts/tasks/notify_group.py +++ b/engine/apps/alerts/tasks/notify_group.py @@ -62,12 +62,16 @@ 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()) - ) + + if notification_policies: + 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" + for notification_policy in notification_policies: if notification_policy.step == UserNotificationPolicy.Step.NOTIFY: notification_channels.append( diff --git a/grafana-plugin/CHANGELOG.md b/grafana-plugin/CHANGELOG.md index 6545f14f..b028104c 100644 --- a/grafana-plugin/CHANGELOG.md +++ b/grafana-plugin/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## v1.0.30 (2022-08-31) +- Bug fix: check user notification policy before access + ## v1.0.29 (2022-08-31) - Add arm64 docker image @@ -82,7 +85,7 @@ ## 1.0.2 (2022-06-17) - Fix Grafana Alerting integration to handle API changes in Grafana 9 -- Improve public api endpoint for for outgoing webhooks (/actions) by adding ability to create, update and delete outgoing webhook instance +- Improve public api endpoint for outgoing webhooks (/actions) by adding ability to create, update and delete outgoing webhook instance ## 1.0.0 (2022-06-14)