tags: don't create mod action when tag is deprecated.

Not needed anymore since deprecations are now tracked in the tag history.
This commit is contained in:
evazion
2022-09-12 02:06:16 -05:00
parent 600e75e324
commit 2c37fdf9e8

View File

@@ -25,7 +25,6 @@ class Tag < ApplicationRecord
validates :category, inclusion: { in: TagCategory.category_ids }
before_create :create_character_tag_for_cosplay_tag, if: :is_cosplay_tag?
before_save :create_mod_action
after_save :update_category_cache, if: :saved_change_to_category?
after_save :update_category_post_counts, if: :saved_change_to_category?
@@ -212,17 +211,6 @@ class Tag < ApplicationRecord
end
end
concerning :DeprecationMethods do
def create_mod_action
return if CurrentUser.user == User.system
if is_deprecated_was == true and is_deprecated == false
ModAction.log("marked the tag [[#{name}]] as not deprecated", :tag_undeprecate)
elsif is_deprecated_was == false and is_deprecated == true
ModAction.log("marked the tag [[#{name}]] as deprecated", :tag_deprecate)
end
end
end
concerning :WordMethods do
# Characters that delimit words in tags.
WORD_DELIMITERS = " _+:;!./()-"