From c3c0769534d986d4d2b59d36fe503ec61d09f06e Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Fri, 29 Nov 2024 16:39:35 -0500 Subject: [PATCH] wip --- engine/apps/alerts/models/alert_group.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/apps/alerts/models/alert_group.py b/engine/apps/alerts/models/alert_group.py index aef341bff..cf0c39063 100644 --- a/engine/apps/alerts/models/alert_group.py +++ b/engine/apps/alerts/models/alert_group.py @@ -2014,6 +2014,8 @@ def is_presented_in_slack(self): @property def slack_channel_id(self) -> str | None: + channel_filter = self.channel_filter + if not self.channel.organization.slack_team_identity: return None elif self.slack_message: @@ -2022,8 +2024,8 @@ def slack_channel_id(self) -> str | None: # # return self.slack_message.channel.slack_id return self.slack_message._channel_id - elif self.channel_filter and self.channel_filter.slack_channel_or_org_default: - return self.channel_filter.slack_channel_or_org_default.slack_id + elif channel_filter and channel_filter.slack_channel_or_org_default: + return channel_filter.slack_channel_or_org_default.slack_id return None @property