openwisp-controller icon indicating copy to clipboard operation
openwisp-controller copied to clipboard

[bug] VpnClient deletion does not respect `auto_cert` flag

Open pandafy opened this issue 3 years ago • 3 comments

Removing a VPN Client template from a device will delete the related VpnClient object. This in-turn deletes related Cert objects due to on_delete=models.CASCADE.

Instead of using database cascading, we can add a post_delete handler that only deletes related certificates if auto_cert field is set to True.

pandafy avatar Jan 28 '22 17:01 pandafy

I would like to work on this.

yashikajotwani12 avatar Jan 31 '22 11:01 yashikajotwani12

Hi @yashikajotwani12! This is an advance issue that will require some discussion before implementing a solution. Consider taking up another issue.

Thanks!

pandafy avatar Jan 31 '22 12:01 pandafy

Hi @yashikajotwani12! This is an advance issue that will require some discussion before implementing a solution. Consider taking up another issue.

Thanks!

Okay, sure! I will look for another issue. Thanks

yashikajotwani12 avatar Jan 31 '22 12:01 yashikajotwani12