Skip to content

Commit

Permalink
Do not reactivate incident participant if incident is closed (#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvilanova authored Feb 10, 2022
1 parent 90bf7c0 commit ab80e62
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dispatch/incident/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1342,10 +1342,11 @@ def incident_add_or_reactivate_participant_flow(
if participant.active_roles:
return participant

# we reactivate the participant
participant_flows.reactivate_participant(
user_email, incident, db_session, service_id=service_id
)
if incident.status != IncidentStatus.closed:
# we reactivate the participant
participant_flows.reactivate_participant(
user_email, incident, db_session, service_id=service_id
)
else:
# we add the participant to the incident
participant = participant_flows.add_participant(
Expand Down

0 comments on commit ab80e62

Please sign in to comment.