avoid unnecessary queries on ForeignKey(on_delete=models.DO_NOTHING)
|Reported by:||Collin Anderson||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When deleting objects in the admin, there is no need to run queries on related ForeignKey(on_delete=models.DO_NOTHING).
The query happens when viewing the delete page in the admin. I'm doing some tricky model stuff and would prefer if my model wasn't queried at all.
I propose this change: