Describe the bug
Currently, most M2M models are not deleted when their related model is deleted. The on_delete doesn't take effect as we use soft delete for all the models that inherits from BaseModel.
Expected behaviorModelAB should be updated to deleted=True when ModelA or ModelB is deleted.
Many to Many models in CARE that are potentially having this issue.
Describe the bug Currently, most M2M models are not deleted when their related model is deleted. The
on_delete
doesn't take effect as we use soft delete for all the models that inherits fromBaseModel
.Expected behavior
ModelAB
should be updated todeleted=True
whenModelA
orModelB
is deleted.Many to Many models in CARE that are potentially having this issue.
UserDefaultAssetLocation
FacilityDefaultAssetLocation
AssetBed
#1322ConsultationBed
FacilityUser
InvestigationValue
PatientSample