Skip to content

Commit 424cd05

Browse files
fix(np): Updates issue notification data factory to select correct handler class (#112892)
1 parent 4711565 commit 424cd05

File tree

1 file changed

+2
-3
lines changed
  • src/sentry/notifications/notification_action

1 file changed

+2
-3
lines changed

src/sentry/notifications/notification_action/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,12 @@ def execute_via_metric_alert_handler(invocation: ActionInvocation) -> None:
113113

114114

115115
def issue_notification_data_factory(invocation: ActionInvocation) -> IssueNotificationData:
116-
from sentry.notifications.notification_action.types import BaseIssueAlertHandler
117-
118116
action = invocation.action
119117
detector = invocation.detector
120118
event_data = invocation.event_data
121119

122-
rule_instance = BaseIssueAlertHandler.create_rule_instance_from_action(
120+
handler = issue_alert_handler_registry.get(action.type)
121+
rule_instance = handler.create_rule_instance_from_action(
123122
action=action,
124123
detector=detector,
125124
event_data=event_data,

0 commit comments

Comments
 (0)