Skip to content

clear_duplicate_history command feature: allow to exclude some fields from diff_against check #674

Closed
@MaximZemskov

Description

@MaximZemskov

Hey.

clear_duplicate_history command deletes only absolute identical instances, but there is an issue: if an instance has auto updated fields (e.g. version, updated_at) the command is not going to delete these duplicates

Is there a way to add a feature which would allow providing an exclude_list arg to the command and passing it to the diff_against method?

Activity

rossmechanic

rossmechanic commented on Jun 19, 2020

@rossmechanic

@MaximZemskov, absolutely. Feel free to add a PR to update the clean_duplicate_history management command to allow for excluded fields. Think you would just have to update the diff_against method to ignore excluded fields

added 2 commits that reference this issue on Jun 22, 2020

[django-commons#674] Allow to exclude some fields from `diff_against`…

[django-commons#674] Allow to exclude some fields from `diff_against`…

MaximZemskov

MaximZemskov commented on Jun 23, 2020

@MaximZemskov
ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @rossmechanic@MaximZemskov

        Issue actions

          clear_duplicate_history command feature: allow to exclude some fields from `diff_against` check · Issue #674 · django-commons/django-simple-history