Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean_duplicate_history does not clean the history of deleted model instances #1436

Open
dzonecat opened this issue Jan 10, 2025 · 0 comments

Comments

@dzonecat
Copy link

Describe the bug
The management command clean_duplicate_history does only clean the history of model instances that exist. The documentation gives no indication to assume deleted model instances are excluded from cleaning.

To Reproduce

  1. Save a history-enabled model instance multiple times without changing values
  2. Delete the instance
  3. Run clean_duplicate_history
  4. Inspect the models history table in the database and find history entries with type ~ and unchanged data.

Expected behavior
History of deleted model instances is cleaned.

Environment:

  • Django Simple History Version: 3.7.0
  • Django Version: 5.1.4
  • Database Version: PostgreSQL 15.4
  • Python Version: 3.12.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant