Skip to content

Commit 7178318

Browse files
authored
[Bugs] Check incident status before re-adding IC (Netflix#4582)
If an incident is closed, we expect the incident conversation to be closed as well. This will cause errors in slack, if we try to add someone to an archived conversation and send a message to that archived conversation.
1 parent 19b1774 commit 7178318

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dispatch/incident/flows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ def incident_remove_participant_flow(
10281028

10291029
return
10301030

1031-
if user_email == incident.commander.individual.email:
1031+
if incident.status != IncidentStatus.closed and user_email == incident.commander.individual.email:
10321032
# we add the participant to the conversation
10331033
conversation_flows.add_incident_participants(
10341034
incident=incident, participant_emails=[user_email], db_session=db_session

0 commit comments

Comments
 (0)