Skip to content

Commit c986a48

Browse files
committed
Only return the detectors to connect, rather than all created detectors.
1 parent b4286e1 commit c986a48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sentry/workflow_engine/migration_helpers/issue_alert_migration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ def _create_detector_lookups(self) -> list[Detector]:
135135
defaults={"config": {}, "name": ISSUE_STREAM_DETECTOR_NAME},
136136
)
137137

138-
return [error_detector, issue_stream_detector]
138+
# We are not returning the error_detector here to simplify
139+
# _connect_default_detectors
140+
return [issue_stream_detector]
139141

140142
def _connect_default_detectors(self, workflow: Workflow) -> None:
141143
default_detectors = self._create_detector_lookups()
@@ -151,7 +153,6 @@ def _connect_default_detectors(self, workflow: Workflow) -> None:
151153
workflow=workflow,
152154
)
153155
for detector in default_detectors
154-
if detector.type != ErrorGroupType.slug
155156
]
156157

157158
DetectorWorkflow.objects.bulk_create(

0 commit comments

Comments
 (0)