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-6714 Prevent tag sets becoming ownerless #4863

Conversation

tommilligan
Copy link
Contributor

@tommilligan tommilligan commented Jun 26, 2024

Pull Request Checklist

Issue

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

Purpose

This PR implements point 2. of the "What should happen" section of AO3-6714. For that specific case, if you:

  • Are already an owner of a tagset more than once
  • Edit the tagset
  • Remove yourself as an owner

You are now only removed as a tagset owner once. You remain a tagset owner at least once. This means the tagset cannot be orphaned.

In more general terms, this PR enforces that when removing owners from a tagset:

  • The number of TagSetOwnership records removed is at most one
  • At least one TagSetOwnership records exist for an OwnedTagSet

Testing Instructions

Follow the reproduction instructions in AO3-6714. You will still be able to create a tagset where a single user owns it twice, but you can no longer remove all owners from the tagset.

References

N/A

Credit

What name and pronouns should we use to credit you in the Archive of Our Own's Release Notes?

Tom Milligan (they/them)

@tommilligan tommilligan force-pushed the AO3-6714-no-duplicate-tag-set-owners branch from 23b5402 to 598a1f2 Compare June 26, 2024 14:39
@tommilligan tommilligan force-pushed the AO3-6714-no-duplicate-tag-set-owners branch from 598a1f2 to 555409f Compare June 26, 2024 14:40
@tommilligan tommilligan force-pushed the AO3-6714-no-duplicate-tag-set-owners branch 3 times, most recently from 51d4855 to 3d9ba13 Compare June 26, 2024 18:08
@tommilligan tommilligan force-pushed the AO3-6714-no-duplicate-tag-set-owners branch from 3d9ba13 to 64092e8 Compare June 26, 2024 18:21
@brianjaustin
Copy link
Member

Thanks for the PR @tommilligan! I saw that you also have #4864 open for this issue, and since that one seems to be more complete, I'm going to close this one. (In general, we tend to stick with 1 PR per issue because otherwise there can be some unfortunate merge conflicts that are annoying for folks to untangle.)

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.

2 participants