Skip to content

Commit 146b308

Browse files
authored
fix(aci milestone 3): fix priority fetching (#98981)
Priority is a field on the occurrence, not stored in the evidence data. :oops:
1 parent 8e434c5 commit 146b308

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sentry/workflow_engine/models/incident_groupopenperiod.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ def create_incident_for_open_period(cls, occurrence, alert_rule, group, open_per
132132
# XXX: if this is the very first open period, or if the priority didn't change from the last priority on the last open period,
133133
# manually add the first incident status change activity because the group never changed priority
134134
# if the priority changed, then the call to update_incident_status in update_priority will be a no-op.
135-
priority = occurrence.evidence_data.get("priority", DetectorPriorityLevel.HIGH)
135+
priority = (
136+
occurrence.priority if occurrence.priority is not None else DetectorPriorityLevel.HIGH
137+
)
136138
severity = (
137139
IncidentStatus.CRITICAL
138140
if priority == DetectorPriorityLevel.HIGH

0 commit comments

Comments
 (0)