Skip to content

Unhelpful changes_display_dict output for m2m changes #800

@Tomcat-Engineering

Description

@Tomcat-Engineering

For changes to many-to-many fields, the changes_display_dict method always returns ['type', 'objects', 'operation'] rather than telling you what the actual changes are.

This is because the changes_dict entry contains something like {'type': 'm2m', 'objects': ['FOO'], 'operation': 'add'}, and the changes_display_dict method tries to turn that into something "human readable" just by iterating over it... iterating a dict just gives you the keys.

Related to #585.

I'm not sure what the answer is though, because it isn't obvious how you'd return m2m changes as a tuple, and returning some other type would be a breaking change.

Is this something that other people already have workarounds for (other than just implementing your own version of changes_display_dict)?

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