drf-tracking icon indicating copy to clipboard operation
drf-tracking copied to clipboard

Users not deletable anymore - Change on_delete

Open maurice-g opened this issue 8 years ago • 0 comments

Introducing on_delete=models.PROTECT for the ApiRequestLog object in response to #91 makes it impossible to delete users without deleting every single related API request manually beforehand.

Please change the behaviour to on_delete=models.CASCADE, which makes sure that users can be deleted and all related API request logs will be also removed in the process.

Alternatively SET_NULL would also be an option, if you want to keep the request logs intact also after user deletion.

maurice-g avatar Feb 08 '18 08:02 maurice-g