Skip to content

Commit

Permalink
AO3-5538 Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilka2 committed Sep 19, 2024
1 parent f8990e0 commit 6a47bd3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1189,15 +1189,15 @@ def update_tag_nominations

TagNomination.where(tagname: name, parent_tagname: parent_names).update_all(parented: true)

if saved_change_to_name? && name_before_last_save.present?
# Act as if the tag with the previous name was deleted and mirror clear_tag_nominations
TagNomination.where(tagname: name_before_last_save).update_all(
canonical: false,
exists: false,
parented: false,
synonym: nil
)
end
return unless saved_change_to_name? && name_before_last_save.present?

# Act as if the tag with the previous name was deleted and mirror clear_tag_nominations
TagNomination.where(tagname: name_before_last_save).update_all(
canonical: false,
exists: false,
parented: false,
synonym: nil
)
end

before_destroy :clear_tag_nominations
Expand Down

0 comments on commit 6a47bd3

Please sign in to comment.