Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit 647b0b7

Browse files
authored
fix(logging): log case has been linked to incident when incident has a name (#5457)
1 parent 908ed01 commit 647b0b7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/dispatch/case/flows.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,15 @@ def common_escalate_flow(
744744
db_session.add(incident)
745745
db_session.commit()
746746

747+
# we run the incident create flow in a background task
748+
incident = incident_flows.incident_create_flow(
749+
incident_id=incident.id,
750+
organization_slug=organization_slug,
751+
db_session=db_session,
752+
case_id=case.id,
753+
)
754+
755+
# we link the case to the incident
747756
case.incidents.append(incident)
748757
db_session.add(case)
749758
db_session.commit()
@@ -755,14 +764,6 @@ def common_escalate_flow(
755764
case_id=case.id,
756765
)
757766

758-
# we run the incident create flow in a background task
759-
incident = incident_flows.incident_create_flow(
760-
incident_id=incident.id,
761-
organization_slug=organization_slug,
762-
db_session=db_session,
763-
case_id=case.id,
764-
)
765-
766767
# we add the case participants to the incident
767768
for participant in case.participants:
768769
# check to see if already a participant in the incident

0 commit comments

Comments
 (0)