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

Track which Author/Work/Edition a duplicate has been merged into #3299

Merged
merged 8 commits into from
Apr 9, 2024

Conversation

Minnozz
Copy link
Contributor

@Minnozz Minnozz commented Mar 1, 2024

Delete the duplicate, but also store its ID and the one it has been merged into for future reference.

  • Add MergedBookDataModel
  • Move merging code from management command to BookDataModel
  • Create an instance of MergedBookDataModel before deleting a duplicate
  • Redirect web requests to the canonical entity when a request for the duplicate entity is received
  • Return the correct ActivityPub response for a duplicate entity
    • The data of the canonical object is returned, without any redirecting or Move responses
  • Verify whether edition_rank still picks a good edition after merging Works
    • A suboptimal Edition may be chosen after merging Works, but that is unrelated to this PR
  • Add tests

First step towards solving #2898

@Minnozz Minnozz force-pushed the absorb branch 4 times, most recently from 4306765 to 3796412 Compare March 2, 2024 10:51
@Minnozz Minnozz changed the title Track which Author/Work/Edition a duplicate has been merged into (delete) Track which Author/Work/Edition a duplicate has been merged into Mar 5, 2024
@Minnozz Minnozz force-pushed the absorb branch 5 times, most recently from 480b727 to f1365ff Compare March 5, 2024 16:22
@Minnozz Minnozz marked this pull request as ready for review March 5, 2024 16:26
@Minnozz Minnozz force-pushed the absorb branch 2 times, most recently from 2489e76 to f3448d1 Compare March 11, 2024 19:11
@Minnozz
Copy link
Contributor Author

Minnozz commented Mar 16, 2024

Note: this PR currently includes #3313 because that bug surfaced in the tests here, but we will merge #3134 instead of #3313, which also fixes that bug.

@Minnozz Minnozz force-pushed the absorb branch 2 times, most recently from 804e946 to fa277ff Compare March 20, 2024 11:17
@mouse-reeve mouse-reeve merged commit 7363033 into bookwyrm-social:main Apr 9, 2024
10 checks passed
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