Skip to content

Commit

Permalink
Remove extra conditional in resource creation for Case flow (#3838)
Browse files Browse the repository at this point in the history
* Remove extra conditional

* Add not check for update ticket
  • Loading branch information
wssheldon authored Oct 4, 2023
1 parent 7a0b5b3 commit 253f073
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/dispatch/case/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,14 @@ def case_new_create_flow(
case=case, db_session=db_session
)

if create_resources:
case_create_resources_flow(
db_session=db_session,
case_id=case.id,
individual_participants=individual_participants,
team_participants=team_participants,
conversation_target=conversation_target,
)
else:
case_create_resources_flow(
db_session=db_session,
case_id=case.id,
individual_participants=individual_participants,
team_participants=team_participants,
conversation_target=conversation_target,
)
if not create_resources:
# we still want to update the ticket, but not twice if resources are created
ticket_flows.update_case_ticket(case=case, db_session=db_session)

Expand Down

0 comments on commit 253f073

Please sign in to comment.