diff --git a/app/models/post.rb b/app/models/post.rb index 34a929e4c..de38f1edd 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -377,12 +377,6 @@ class Post < ApplicationRecord def update_tag_post_counts decrement_tags = tag_array_was - tag_array - decrement_tags_except_requests = decrement_tags.reject {|tag| tag == "tagme" || tag.end_with?("_request")} - if !decrement_tags_except_requests.empty? && !CurrentUser.is_builder? && CurrentUser.created_at > 1.week.ago - self.errors.add(:updater_id, "must have an account at least 1 week old to remove tags") - return false - end - increment_tags = tag_array - tag_array_was if increment_tags.any? Tag.increment_post_counts(increment_tags) diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index b324a89d0..73de4156b 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -569,24 +569,6 @@ class PostTest < ActiveSupport::TestCase @post = FactoryBot.create(:post) end - context "as a new user" do - setup do - @post.update(:tag_string => "aaa bbb ccc ddd tagme") - CurrentUser.user = FactoryBot.create(:user) - end - - should "not allow you to remove tags" do - @post.update(tag_string: "aaa") - assert_equal(["You must have an account at least 1 week old to remove tags"], @post.errors.full_messages) - end - - should "allow you to remove request tags" do - @post.update(tag_string: "aaa bbb ccc ddd") - @post.reload - assert_equal("aaa bbb ccc ddd", @post.tag_string) - end - end - context "with a banned artist" do setup do CurrentUser.scoped(FactoryBot.create(:admin_user)) do