Skip to content

Commit

Permalink
Remove triage objects on reset
Browse files Browse the repository at this point in the history
Leaving these behind will raise foreign key constraint errors when
deleting patients.
  • Loading branch information
misaka authored and tvararu committed Nov 18, 2024
1 parent d96a48f commit 502651d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/dev_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def reset_organisation
ConsentForm.where(organisation:).delete_all
Consent.where(organisation:).delete_all

Triage.where(organisation:).delete_all

Patient
.joins(:cohort)
.where(cohorts: { organisation: })
Expand Down

0 comments on commit 502651d

Please sign in to comment.