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
12 changes: 6 additions & 6 deletions src/dispatch/task/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def create(*, db_session, task_in: TaskCreate) -> Task:
db_session=db_session, incident_id=incident.id, email=i.individual.email
)

assignee = incident_flows.incident_add_or_reactivate_participant_flow(
db_session=db_session,
incident_id=incident.id,
user_email=i.individual.email,
)

if not participant or not participant.active_roles:
# send emphemeral message to user about why they are being added to the incident
send_task_add_ephemeral_message(
Expand All @@ -88,12 +94,6 @@ def create(*, db_session, task_in: TaskCreate) -> Task:
task=task_in,
)

assignee = incident_flows.incident_add_or_reactivate_participant_flow(
db_session=db_session,
incident_id=incident.id,
user_email=i.individual.email,
)

# due to the freeform nature of task assignment, we can sometimes pick up other emails
# e.g. a google group that we cannot resolve to an individual assignee
if assignee:
Expand Down
Loading