Skip to content

Commit

Permalink
Fixes issue with incident assign role flow (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvilanova authored Feb 14, 2022
1 parent 21b13c7 commit 29ffd7d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/dispatch/incident/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 29ffd7d

Please sign in to comment.