about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-04-16 22:01:05 +0200
committerGitHub <noreply@github.com>2021-04-16 22:01:05 +0200
commitdde8739020eb201d1c9a31da116e3e771f1439b8 (patch)
treef9a95bc119e3c2105d6c642088b2de48f020f90c /app/services
parentbaed52c2a7d8f91bae3c69150005fc528387785c (diff)
Fix reports of already suspended accounts being recorded (#16047)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/report_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/report_service.rb b/app/services/report_service.rb
index 9d9c7d6c9..bc0a8b464 100644
--- a/app/services/report_service.rb
+++ b/app/services/report_service.rb
@@ -10,6 +10,8 @@ class ReportService < BaseService
     @comment        = options.delete(:comment) || ''
     @options        = options
 
+    raise ActiveRecord::RecordNotFound if @target_account.suspended?
+
     create_report!
     notify_staff!
     forward_to_origin! if !@target_account.local? && ActiveModel::Type::Boolean.new.cast(@options[:forward])