mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
parent
69213d2ea4
commit
9eccfb7b52
@ -335,7 +335,7 @@ class PostsController < ApplicationController
|
|||||||
params.require(:post_ids)
|
params.require(:post_ids)
|
||||||
agree_with_first_reply_flag = (params[:agree_with_first_reply_flag] || true).to_s == "true"
|
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?
|
raise Discourse::InvalidParameters.new(:post_ids) if posts.blank?
|
||||||
|
|
||||||
# Make sure we can delete the posts
|
# Make sure we can delete the posts
|
||||||
|
Loading…
Reference in New Issue
Block a user