Skip to content

Commit

Permalink
FIX: Guarantee order to correctly defer replies in review queue (disc…
Browse files Browse the repository at this point in the history
…ourse#8426)

Our code used to  approve the first flagged post and ignore the rest in some specific conditions.
  • Loading branch information
romanrizzi authored and SamSaffron committed Dec 3, 2019
1 parent 69213d2 commit 9eccfb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/posts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def destroy_many
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
Expand Down

0 comments on commit 9eccfb7

Please sign in to comment.