about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-12 22:43:43 +0100
committerGitHub <noreply@github.com>2022-02-12 22:43:43 +0100
commit6f78c66fe01921a4e7e01aa6e2386a5fce7f3afd (patch)
treedf49d8aed15d6bb2bda2516c90ff0ef394697c69 /app/controllers
parent27803cd2b7cb88c2c0666f526ca166454afd5283 (diff)
parentf3429d73548145fbf42882c3bf246f8a00d29c98 (diff)
Merge pull request #1691 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/statuses_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/admin/statuses_controller.rb b/app/controllers/admin/statuses_controller.rb
index 8d039b281..817c0caa9 100644
--- a/app/controllers/admin/statuses_controller.rb
+++ b/app/controllers/admin/statuses_controller.rb
@@ -29,8 +29,9 @@ module Admin
     end
 
     def after_create_redirect_path
-      if @status_batch_action.report_id.present?
-        admin_report_path(@status_batch_action.report_id)
+      report_id = @status_batch_action&.report_id || params[:report_id]
+      if report_id.present?
+        admin_report_path(report_id)
       else
         admin_account_statuses_path(params[:account_id], current_params)
       end
@@ -48,6 +49,10 @@ module Admin
       params.slice(*Admin::StatusFilter::KEYS).permit(*Admin::StatusFilter::KEYS)
     end
 
+    def current_params
+      params.slice(:media, :page).permit(:media, :page)
+    end
+
     def action_from_button
       if params[:report]
         'report'