id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux
12760 related models with Foreignkey.null=True must not get deleted on delete of their relation defaultwombat nobody "The ""delete related objects"" process appears bugged to me.
In some lines of the code it looks like the intention was to set foreignkeys of related objects to null if possible, instead of deleting the object. Nevertheless the deletion does happen.
This is only about Realtions with Foreignkey(..,null=True). Other relations work as intended.
=== Problem 1: ===
Related Objects get deleted during delete_objects()
=== Problem 2: ===
Subrelation of related objects get collected during _collect_sub_objects()
Please have a look at the test file.
" closed Database layer (models, ORM) 1.1 duplicate delete foreignkey null kanu@… plandry@… Unreviewed 0 0 0 0