Merge pull request #3446 from BrokenEagle/fix-validator-addtag-cutoffs

Fix cutoff for what is considered an added tag
This commit is contained in:
Albert Yi
2017-12-21 11:21:26 -08:00
committed by GitHub

View File

@@ -1741,7 +1741,7 @@ class Post < ApplicationRecord
end
def added_tags_are_valid
new_tags = added_tags.select { |t| t.post_count <= 1 }
new_tags = added_tags.select { |t| t.post_count <= 0 }
new_general_tags = new_tags.select { |t| t.category == Tag.categories.general }
new_artist_tags = new_tags.select { |t| t.category == Tag.categories.artist }
repopulated_tags = new_tags.select { |t| (t.category != Tag.categories.general) && (t.category != Tag.categories.meta) && (t.created_at < 1.hour.ago) }