artists: fix artist bans not being recorded in artist history.

Using update_column bypasses callbacks, so a new artist version wasn't
created when the is_banned flag was changed.
This commit is contained in:
evazion
2020-05-04 02:54:10 -05:00
parent 6937c40747
commit 66c8c1f53f
3 changed files with 15 additions and 7 deletions

View File

@@ -178,7 +178,7 @@ class Artist < ApplicationRecord
post.update(tag_string: fixed_tags)
end
update_column(:is_banned, false)
update!(is_banned: false)
ModAction.log("unbanned artist ##{id}", :artist_unban)
end
end
@@ -195,7 +195,7 @@ class Artist < ApplicationRecord
tag_implication.approve!(approver: banner)
end
update_column(:is_banned, true)
update!(is_banned: true)
ModAction.log("banned artist ##{id}", :artist_ban)
end
end