aliases: fix blacklists when aliasing tags.

When aliasing a tag, update any blacklists containing the old tag to use
the new tag.
This commit is contained in:
evazion
2020-08-26 16:11:18 -05:00
parent f0299a8945
commit f4f25cf0c8
3 changed files with 48 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ class TagMover
move_artist!
move_wiki!
move_saved_searches!
move_blacklists!
move_posts!
end
end
@@ -58,6 +59,10 @@ class TagMover
SavedSearch.rewrite_queries!(old_tag.name, new_tag.name)
end
def move_blacklists!
User.rewrite_blacklists!(old_tag.name, new_tag.name)
end
def merge_artists!
old_artist.lock!
new_artist.lock!