BURs: don't allow implying tags from different categories.

Don't allow requests for implications between tags of different
categories. For example, don't allow character tags to imply copyright
tags.
This commit is contained in:
evazion
2020-12-02 15:02:29 -06:00
parent 6275e85148
commit 4a4c198287
3 changed files with 20 additions and 0 deletions

View File

@@ -192,6 +192,7 @@ class Artist < ApplicationRecord
# potential race condition but unlikely
unless TagImplication.where(:antecedent_name => name, :consequent_name => "banned_artist").exists?
Tag.find_or_create_by_name("artist:banned_artist") # ensure the banned_artist exists and is an artist tag.
TagImplication.approve!(antecedent_name: name, consequent_name: "banned_artist", approver: banner)
end