From 29ffd7de843671b7e048156bbe449e24710ec666 Mon Sep 17 00:00:00 2001 From: Marc Vilanova <39573146+mvilanova@users.noreply.github.com> Date: Mon, 14 Feb 2022 11:58:23 -0800 Subject: [PATCH] Fixes issue with incident assign role flow (#1988) --- src/dispatch/incident/flows.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/dispatch/incident/flows.py b/src/dispatch/incident/flows.py index 25370a78eb51..b98a2aba437e 100644 --- a/src/dispatch/incident/flows.py +++ b/src/dispatch/incident/flows.py @@ -1128,7 +1128,7 @@ def incident_update_flow( assigner_email=user_email, assignee_email=commander_email, assignee_role=ParticipantRoleType.incident_commander, - organization_slug=organization_slug, + db_session=db_session, ) # we update the reporter if needed @@ -1137,7 +1137,7 @@ def incident_update_flow( assigner_email=user_email, assignee_email=reporter_email, assignee_role=ParticipantRoleType.reporter, - organization_slug=organization_slug, + db_session=db_session, ) # we run the active, stable or closed flows based on incident status change @@ -1173,14 +1173,12 @@ def incident_update_flow( send_incident_update_notifications(incident, previous_incident, db_session) -@background_task def incident_assign_role_flow( incident_id: int, assigner_email: str, assignee_email: str, assignee_role: str, - organization_slug: str = None, - db_session=None, + db_session: SessionLocal, ): """Runs the incident participant role assignment flow.""" # we load the incident instance