potential fix for #2591: Bulk update missed some posts

This commit is contained in:
r888888888
2016-04-25 16:52:57 -07:00
parent 667f912093
commit 634255e584

View File

@@ -13,6 +13,7 @@ module Moderator
CurrentUser.without_safe_mode do
CurrentUser.scoped(updater, updater_ip_addr) do
::Post.tag_match(antecedent).where("true /* Moderator::TagBatchChange#perform */").find_each do |post|
post.reload
tags = (post.tag_array - normalized_antecedent + normalized_consequent).join(" ")
post.update_attributes(:tag_string => tags)
end