Skip to content

Commit

Permalink
Only collect participant emails if individual exists (#5351)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Oct 16, 2024
1 parent 1a52366 commit 581235c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dispatch/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def search(
current_user_email = common["current_user"].email
for incident in results["Incident"]:
participant_emails: list[str] = [
participant.individual.email for participant in incident.participants
participant.individual.email
for participant in incident.participants
if participant.individual
]
if (
incident.project in admin_projects
Expand Down

0 comments on commit 581235c

Please sign in to comment.