bulk update request pruner: fix forum posts reference.

This commit is contained in:
evazion
2020-03-21 18:19:08 -05:00
parent e4d63eb0da
commit 94d78287eb

View File

@@ -5,7 +5,7 @@ module BulkUpdateRequestPruner
BulkUpdateRequest.old.pending.find_each do |bulk_update_request|
if bulk_update_request.forum_topic
body = "This bulk update request is pending automatic rejection in 5 days."
unless bulk_update_request.forum_topic.posts.where(creator_id: User.system.id, body: body).exists?
unless bulk_update_request.forum_topic.forum_posts.where(creator_id: User.system.id, body: body).exists?
bulk_update_request.forum_updater.update(body)
end
end