File tree Expand file tree Collapse file tree
app/controllers/api/testing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ def destroy
2626 log_destroy ( VaccinationRecord . where ( session : sessions ) )
2727
2828 patient_ids = team . patients . pluck ( :id )
29+ consent_form_ids = team . consent_forms . pluck ( :id )
2930
3031 log_destroy ( PatientSession . where ( session : sessions ) )
3132
@@ -38,6 +39,7 @@ def destroy
3839 # In local dev we can end up with NotifyLogEntries without a patient
3940 log_destroy ( NotifyLogEntry . where ( patient_id : nil ) )
4041 log_destroy ( NotifyLogEntry . where ( patient_id : patient_ids ) )
42+ log_destroy ( NotifyLogEntry . where ( consent_form_id : consent_form_ids ) )
4143 log_destroy ( PatientChangeset . where ( patient_id : patient_ids ) )
4244 log_destroy ( PatientSession . where ( patient_id : patient_ids ) )
4345 log_destroy ( PatientSpecificDirection . where ( patient_id : patient_ids ) )
@@ -48,10 +50,10 @@ def destroy
4850 log_destroy ( SchoolMoveLogEntry . where ( patient_id : patient_ids ) )
4951 log_destroy ( VaccinationRecord . where ( patient_id : patient_ids ) )
5052
53+ log_destroy ( ConsentForm . where ( id : consent_form_ids ) )
5154 log_destroy ( SessionDate . where ( session : sessions ) )
5255
5356 log_destroy ( ArchiveReason . where ( team :) )
54- log_destroy ( ConsentForm . where ( team :) )
5557 log_destroy ( Consent . where ( team :) )
5658 log_destroy ( Triage . where ( team :) )
5759
You can’t perform that action at this time.
0 commit comments