Skip to content

AO3-6811 Fix tag nomination parented bug#5845

Open
pmonfort wants to merge 1 commit into
otwcode:masterfrom
pmonfort:AO3-6811
Open

AO3-6811 Fix tag nomination parented bug#5845
pmonfort wants to merge 1 commit into
otwcode:masterfrom
pmonfort:AO3-6811

Conversation

@pmonfort
Copy link
Copy Markdown
Contributor

Pull Request Checklist

Issue

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

Purpose

When a canonical tag is saved, Tag#update_tag_nominations sets parented: true on matching TagNomination records.
However, it only checked for Fandom-type parents and only matched nominations with a blank parent_tagname (empty string).
This caused nominations to be incorrectly marked as parented: false when:

  • The tag's parent was a non-Fandom type (e.g., a Media parent on a Fandom tag).
  • The nomination had a nil parent_tagname instead of an empty string.

This PR fixes both issues by:

  1. Checking all parent types instead of only Fandoms.
  2. Including both "" and nil in the parent_names list so nominations with either blank value are matched.

Testing Instructions

  1. Create a canonical fandom tag with a Media parent (but no Fandom parent).
  2. Create a tag nomination for that fandom in a tag set.
  3. Save the fandom tag.
  4. Verify the nomination's parented field is true.

Credit

Pablo Monfort (he/him)

@sarken sarken self-requested a review June 2, 2026 03:04
@sarken
Copy link
Copy Markdown
Collaborator

sarken commented Jun 2, 2026

Assigning myself as reviewer since I saw some things I want to poke at, but I am beat so that's not gonna happen tonight

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