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

Fix:Remove authors with no books when a books is removed #3668 #3670

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

advplyr
Copy link
Owner

@advplyr advplyr commented Dec 1, 2024

Brief summary

See #3668 for the outlined issue

Which issue is fixed?

Fixes #3668

In-depth Description

Anytime a book is removed/updated we need to ensure that authors with no books (and metadata) and empty series get cleaned up.

This PR adds 2 functions that take in an array of seriesIds and authorIds. Those series & authors are checked for removal.

How have you tested this?

Working on unit test.

- Handles bulk delete, single delete, deleting library folder, and removing items with issues
- Also handles bulk editing and removing authors
@advplyr advplyr marked this pull request as ready for review December 1, 2024 18:55
@advplyr
Copy link
Owner Author

advplyr commented Dec 1, 2024

I added tests for the LibraryItemController endpoint functions which use the 2 functions that handle removing authors/series.

@advplyr advplyr merged commit c03f18b into master Dec 1, 2024
7 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.

[Bug]: Deleting book doesn't remove authors with no books
1 participant