Set approver when creating banned_artist implication.

This commit is contained in:
evazion
2016-10-26 18:50:49 -05:00
parent 1e9bcf75de
commit e67194c19d

View File

@@ -318,7 +318,7 @@ class Artist < ActiveRecord::Base
# potential race condition but unlikely
unless TagImplication.where(:antecedent_name => name, :consequent_name => "banned_artist").exists?
tag_implication = TagImplication.create!(:antecedent_name => name, :consequent_name => "banned_artist", :skip_secondary_validations => true, :status => "pending")
tag_implication.delay(:queue => "default").process!
tag_implication.approve!(CurrentUser.user)
end
update_column(:is_banned, true)