FIX: Guarantee order to correctly defer replies in review queue (#8426)

Our code used to  approve the first flagged post and ignore the rest in some specific conditions.
This commit is contained in:
Roman Rizzi 2019-12-03 04:39:10 -03:00 committed by Sam
parent 69213d2ea4
commit 9eccfb7b52
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ class PostsController < ApplicationController
params.require(:post_ids)
agree_with_first_reply_flag = (params[:agree_with_first_reply_flag] || true).to_s == "true"
posts = Post.where(id: post_ids_including_replies)
posts = Post.where(id: post_ids_including_replies).order(:id)
raise Discourse::InvalidParameters.new(:post_ids) if posts.blank?
# Make sure we can delete the posts