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

AO3-6204 Allow certain admins to remove non-default orphan pseuds from orphaned works #5022

Conversation

Bilka2
Copy link
Contributor

@Bilka2 Bilka2 commented Jan 9, 2025

Issue

https://otwarchive.atlassian.net/browse/AO3-6204

Purpose

Adds a button and a confirmation page to allow some admins to remove non-default orphan_account pseuds from orphaned works.

References

PR Limit: 8 out of 5
Using reviewer bonus:
#4378
#4885

Credit

Bilka

pseuds = Pseud.find(pseuds).select { |p| p.user_id == orphan_account.id }
end

orphan_pseud = orphan_account.default_pseud
Copy link
Member

Choose a reason for hiding this comment

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

You can inline this variable since it's only used once.

Copy link
Contributor Author

@Bilka2 Bilka2 Feb 21, 2025

Choose a reason for hiding this comment

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

It's used multiple times in the loop if multiple pseuds are removed. I want to avoid the DB lookup/cache hit in the loop.

Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@sarken sarken merged commit 9fddb0a into otwcode:master Mar 11, 2025
29 checks passed
@Bilka2 Bilka2 deleted the AO3-6204-allow-to-remove-non-default-orphan-pseuds-from-orphaned-works branch March 13, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants