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 uses default model manager, which may filter out relevant instances #838

Closed
JackAtOmenApps opened this issue Jun 1, 2021 · 1 comment

Comments

@JackAtOmenApps
Copy link

Describe the bug
When using clean_duplicate_history, and models with a default manager (objects = XYZ) which filters out model instances may fail to correctly de-duplicate history (because it can't see all of the instances).

This is very similar to issue #703 for bulk_update_with_history (and its fix, #709).

To Reproduce
Steps to reproduce the behavior:

  1. Install django-simple-history
  2. Add a model manager which applies filtering to a model which uses django-simple-history
  3. Run clean_duplicate_history --auto
  4. De-duplication of the model may be incomplete or not perform any work at all

Expected behavior
clean_duplicate_history should use Django's base manager to ensure all model instances are checked for duplicates.

Note: #804 is the potential fix for this issue

@JackAtOmenApps JackAtOmenApps linked a pull request Jun 1, 2021 that will close this issue
11 tasks
@ddabble
Copy link
Member

ddabble commented Feb 7, 2023

Closing, now that #1115 (replacing #804) was merged.

@ddabble ddabble closed this as completed Feb 7, 2023
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

Successfully merging a pull request may close this issue.

2 participants