care
care copied to clipboard
implementing manual logic of on_delete option in M2M models
Proposed Changes
-
Implementing on_delete logic in below M2M models as it doesnt work coz of our soft delete logic.
-
[x] UserDefaultAssetLocation ( Implements soft delete logic on - AsseLocation , User )
-
[x] FacilityDefaultAssetLocation ( Implements soft delete logic on - AssetLocation, Facility )
-
[x] ConsultationBed ( Implements soft delete logic on - Bed, PatientConsultation )
-
[x] FacilityUser ( Implements soft delete logic on - Facility , user, created_by )
-
[x] InvestigationValue ( Implements soft delete logic on - PatientConsultation, PatientInvestigationGroup, PatientInvestigation, InvestigationSession )
-
[x] PatientSample ( Implements soft delete logic on - PatientRegistration, PatientConsulation and set NULL to created_by, last_edited_by of User Model , Facility )
-
For relations having models.CASCADE and models.PROTECT - I implemented soft delete logic
-
For relations having models.SET_NULL - I set them to NULL
Associated Issue
- Fixes #1330
@coronasafe/code-reviewers