BURs: move the is_banned flag when aliasing artists.
When a banned artist tag is aliased into a nonbanned artist tag, move the is_banned flag from the old artist entry to the new artist_entry. Related to #4940. Fixes a case where a banned artist could lose the banned status when it was moved.
This commit is contained in:
@@ -156,12 +156,14 @@ class TagMover
|
||||
new_artist.group_name = old_artist.group_name unless new_artist.group_name.present?
|
||||
new_artist.url_string += "\n" + old_artist.url_string
|
||||
new_artist.is_deleted = false
|
||||
new_artist.is_banned = old_artist.is_banned || new_artist.is_banned
|
||||
new_artist.save!
|
||||
|
||||
old_artist.other_names = [new_artist.name]
|
||||
old_artist.group_name = ""
|
||||
old_artist.url_string = ""
|
||||
old_artist.is_deleted = true
|
||||
old_artist.is_banned = false
|
||||
old_artist.save!
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user