File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/controllers/api/testing Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ def destroy
26
26
log_destroy ( VaccinationRecord . where ( session : sessions ) )
27
27
28
28
patient_ids = team . patients . pluck ( :id )
29
+ consent_form_ids = team . consent_forms . pluck ( :id )
29
30
30
31
log_destroy ( PatientSession . where ( session : sessions ) )
31
32
@@ -38,6 +39,7 @@ def destroy
38
39
# In local dev we can end up with NotifyLogEntries without a patient
39
40
log_destroy ( NotifyLogEntry . where ( patient_id : nil ) )
40
41
log_destroy ( NotifyLogEntry . where ( patient_id : patient_ids ) )
42
+ log_destroy ( NotifyLogEntry . where ( consent_form_id : consent_form_ids ) )
41
43
log_destroy ( PatientChangeset . where ( patient_id : patient_ids ) )
42
44
log_destroy ( PatientSession . where ( patient_id : patient_ids ) )
43
45
log_destroy ( PatientSpecificDirection . where ( patient_id : patient_ids ) )
@@ -48,10 +50,10 @@ def destroy
48
50
log_destroy ( SchoolMoveLogEntry . where ( patient_id : patient_ids ) )
49
51
log_destroy ( VaccinationRecord . where ( patient_id : patient_ids ) )
50
52
53
+ log_destroy ( ConsentForm . where ( id : consent_form_ids ) )
51
54
log_destroy ( SessionDate . where ( session : sessions ) )
52
55
53
56
log_destroy ( ArchiveReason . where ( team :) )
54
- log_destroy ( ConsentForm . where ( team :) )
55
57
log_destroy ( Consent . where ( team :) )
56
58
log_destroy ( Triage . where ( team :) )
57
59
You can’t perform that action at this time.
0 commit comments