File tree 1 file changed +5
-3
lines changed
src/sentry/workflow_engine/handlers/action
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
from sentry .eventstore .models import GroupEvent
2
2
from sentry .workflow_engine .actions .notification_action import send_notification_using_rule_registry
3
- from sentry .workflow_engine .models import Action , Detector
3
+ from sentry .workflow_engine .models import Action , DataSource , Detector
4
4
from sentry .workflow_engine .registry import action_handler_registry
5
- from sentry .workflow_engine .types import ActionHandler , DetectorType
5
+ from sentry .workflow_engine .types import ActionHandler
6
6
7
7
8
8
@action_handler_registry .register (Action .Type .NOTIFICATION )
@@ -24,7 +24,9 @@ def execute(
24
24
# TODO(iamrajjoshi): Add a check to see if the detector belongs to the same project as the group_event
25
25
assert detector .project == group_event .project
26
26
27
- if detector .type == DetectorType .ERROR :
27
+ data_source = DataSource .objects .get (id = action .data_source_id )
28
+
29
+ if data_source .type == "IssueOccurrence" :
28
30
# We should use the legacy issue alert notification logic
29
31
send_notification_using_rule_registry (action , detector , group_event )
30
32
else :
You can’t perform that action at this time.
0 commit comments