Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/dispatch/incident/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ def add_participant_to_tactical_group(user_email: str, incident_id: int, db_sess
@background_task
def incident_create_stable_flow(*, incident_id: int, checkpoint: str = None, db_session=None):
"""Creates all resources necessary when an incident is created as 'stable'."""
incident = incident_create_flow(incident_id=incident_id, db_session=db_session)
incident_create_flow(incident_id=incident_id, db_session=db_session)
incident = incident_service.get(db_session=db_session, incident_id=incident_id)
incident_stable_status_flow(incident=incident, db_session=db_session)


Expand Down Expand Up @@ -418,7 +419,7 @@ def incident_create_closed_flow(*, incident_id: int, checkpoint: str = None, db_
# Then checking for the existence of those resources before creating them for
# this incident.
@background_task
def incident_create_flow(*, incident_id: int, checkpoint: str = None, db_session=None) -> Incident:
def incident_create_flow(*, incident_id: int, checkpoint: str = None, db_session=None):
"""Creates all resources required for new incidents."""
incident = incident_service.get(db_session=db_session, incident_id=incident_id)

Expand Down Expand Up @@ -641,8 +642,6 @@ def incident_create_flow(*, incident_id: int, checkpoint: str = None, db_session
incident_id=incident.id,
)

return incident


def incident_active_status_flow(incident: Incident, db_session=None):
"""Runs the incident active flow."""
Expand Down