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

Fixes #1472 #1474

Merged
merged 2 commits into from
Aug 22, 2022
Merged

Fixes #1472 #1474

merged 2 commits into from
Aug 22, 2022

Conversation

nagmat84
Copy link
Collaborator

@nagmat84 nagmat84 commented Aug 21, 2022

Fixes #1472.

This PR pulls out the code for deleting the sub-forest of albums from the main method into an own method deleteSubForest. This does not fix the bug (obviously) but helps to structure the main method.

The actual fix is

if ($albums->isEmpty()) {
	return;
}

at the beginning of the new method deleteSubForest which avoids attempting to delete the whole database if the set of (regular) albums is empty.

@nagmat84 nagmat84 added bug Something isn't working High Priority High priority issues labels Aug 21, 2022
@nagmat84 nagmat84 marked this pull request as ready for review August 21, 2022 10:36
@nagmat84 nagmat84 requested a review from a team August 21, 2022 10:36
@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #1474 (b48f74b) into master (4aa4ffb) will decrease coverage by 0.72%.
The diff coverage is 100.00%.

Copy link
Member

@ildyria ildyria left a comment

Choose a reason for hiding this comment

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

LGTM.

@nagmat84 nagmat84 merged commit 7ba064f into master Aug 22, 2022
@nagmat84 nagmat84 deleted the fix-1472 branch August 22, 2022 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Priority High priority issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to delete tag album - foreign key violation
2 participants