Fix #4683: Automove _(style) tags when artists are processed via BUR.

This commit is contained in:
evazion
2021-02-03 21:27:35 -06:00
parent 19974d3ab1
commit b03d8e728d
2 changed files with 23 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ class TagMover
move_aliases!
move_implications!
move_cosplay_tag!
move_style_tag!
move_artist!
move_wiki!
move_saved_searches!
@@ -84,6 +85,15 @@ class TagMover
end
end
def move_style_tag!
old_style_tag = "#{old_tag.name}_(style)"
new_style_tag = "#{new_tag.name}_(style)"
if old_tag.artist? && Tag.nonempty.exists?(name: old_style_tag)
TagMover.new(old_style_tag, new_style_tag).move!
end
end
def move_saved_searches!
SavedSearch.rewrite_queries!(old_tag.name, new_tag.name)
end