Skip to content

DoesNotExist error occurs during deletion if the defer field is present #709

Open
@KeiKawashima-HEROZ

Description

@KeiKawashima-HEROZ

When serialize_data=True, a DoesNotExist error occurs during deletion if the defer field is present.

This happens because, with serialize_data=True, it tries to retrieve all fields not listed in serialize_kwargs['fields'], but the record has already been deleted.

for field in instance_copy._meta.fields:

It should only attempt to retrieve fields that are explicitly listed in serialize_kwargs['fields'].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions