When I try to delete Comany (model) with related objects, I get strange exception: Object matching query does not exist when try to delete object
company = Company.objects.get(id=request.GET.get('id'))
company.delete() //on this line
Could you please explain what could be issues, as django should delete related objects by default?
This error was because of using post_delete signal, it tried to access data that was already deleted and unaccessible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With