Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(case): ensure participant read through individual #5396

Merged
merged 1 commit into from
Oct 25, 2024
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
8 changes: 4 additions & 4 deletions src/dispatch/case/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def case_update_flow(
# we get the case
case = get(db_session=db_session, case_id=case_id)

if reporter_email and case and reporter_email != case.reporter.email:
if reporter_email and case and reporter_email != case.reporter.individual.email:
# we run the case assign role flow for the reporter if it changed
case_assign_role_flow(
case_id=case.id,
Expand All @@ -345,7 +345,7 @@ def case_update_flow(
db_session=db_session,
)

if assignee_email and case and assignee_email != case.assignee.email:
if assignee_email and case and assignee_email != case.assignee.individual.email:
# we run the case assign role flow for the assignee if it changed
case_assign_role_flow(
case_id=case.id,
Expand Down Expand Up @@ -374,15 +374,15 @@ def case_update_flow(

if case.tactical_group:
# we update the tactical group
if reporter_email and reporter_email != case.reporter.email:
if reporter_email and reporter_email != case.reporter.individual.email:
group_flows.update_group(
subject=case,
group=case.tactical_group,
group_action=GroupAction.add_member,
group_member=reporter_email,
db_session=db_session,
)
if assignee_email and assignee_email != case.assignee.email:
if assignee_email and assignee_email != case.assignee.individual.email:
group_flows.update_group(
subject=case,
group=case.tactical_group,
Expand Down
Loading