Skip to content

Commit a5d5115

Browse files
ClearlyClairehiyuki2578
authored andcommitted
Do not error out when performing admin actions on no statuses (mastodon#10094)
Same as mastodon#8220 but for reports
1 parent b6311ab commit a5d5115

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/controllers/admin/reported_statuses_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ def create
1010
@form = Form::StatusBatch.new(form_status_batch_params.merge(current_account: current_account, action: action_from_button))
1111
flash[:alert] = I18n.t('admin.statuses.failed_to_execute') unless @form.save
1212

13+
redirect_to admin_report_path(@report)
14+
rescue ActionController::ParameterMissing
15+
flash[:alert] = I18n.t('admin.statuses.no_status_selected')
16+
1317
redirect_to admin_report_path(@report)
1418
end
1519

0 commit comments

Comments
 (0)