From 1c826471e7d964f0fdb2dc2b89dcd5a19c017538 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Sat, 27 Nov 2021 06:12:27 +0900 Subject: Fix admin statuses order(#16937) (#16969) * Fix #16937 * Add test for statuses order --- app/controllers/admin/statuses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/admin') diff --git a/app/controllers/admin/statuses_controller.rb b/app/controllers/admin/statuses_controller.rb index 58a0eb84c..b3fd4c424 100644 --- a/app/controllers/admin/statuses_controller.rb +++ b/app/controllers/admin/statuses_controller.rb @@ -14,7 +14,7 @@ module Admin @statuses = @account.statuses.where(visibility: [:public, :unlisted]) if params[:media] - @statuses.merge!(Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id)).reorder('statuses.id desc') + @statuses = @statuses.merge(Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id)).reorder('statuses.id desc') end @statuses = @statuses.preload(:media_attachments, :mentions).page(params[:page]).per(PER_PAGE) -- cgit