Skip to content

Not all related objects should be deleted #13

@psychok7

Description

@psychok7

When an object is "deleted", its related models which the foreign key to this object is null=True should not be deleted. Instead the related model foreign key should be set to None

Current behavior simply deletes all related on cascade which is not correct.

Proposed Solution:
We should access the Meta fields of each related object and check if the foreign key to the object being deleted can be null or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions