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

Base manager can now be used for clean_duplicate_history #1115

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

nick-traeger
Copy link
Contributor

@nick-traeger nick-traeger commented Jan 26, 2023

Description

clean_duplicate_history uses objects as manager. This has now been changed to _default_manager and an option added to use _base_mananger.

Recreated pull request #804

Related Issue

none

Motivation and Context

We use a manager to filter records by default, however we want to remove all records from duplicates.

How Has This Been Tested?

The command was first run without parameters and then with the new --base-manager parameter. Also added a new test.

Screenshots (if appropriate):

none

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run the pre-commit run command to format and lint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added my name and/or github handle to AUTHORS.rst
  • I have added my change to CHANGES.rst
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Merging #1115 (44f687e) into master (309609e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1115   +/-   ##
=======================================
  Coverage   97.23%   97.24%           
=======================================
  Files          23       23           
  Lines        1231     1234    +3     
  Branches      199      200    +1     
=======================================
+ Hits         1197     1200    +3     
  Misses         16       16           
  Partials       18       18           
Impacted Files Coverage Δ
...ory/management/commands/clean_duplicate_history.py 97.33% <100.00%> (+0.11%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@ddabble ddabble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! (Especially since the same changes received mainly positive feedback in #804 🙂)

@ddabble
Copy link
Member

ddabble commented Feb 7, 2023

Merging, as the failing tests are not related to this PR (they're fixed in #1124).

Thank you, @nick-traeger! 😊

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 this pull request may close these issues.

None yet

2 participants