]> cat aescling's git repositories - mastodon.git/commitdiff
Fix a type error in domain_block policies (#17735)
authorTakeshi Umeda <noel.yoshiba@gmail.com>
Thu, 10 Mar 2022 03:10:20 +0000 (12:10 +0900)
committerGitHub <noreply@github.com>
Thu, 10 Mar 2022 03:10:20 +0000 (04:10 +0100)
app/models/domain_block.rb

index b06fa09dac43ff3e75492744d0a16895ea282918..2b797ef918cc5a37f2a4c459f34ccd9886f2cb01 100644 (file)
@@ -32,7 +32,7 @@ class DomainBlock < ApplicationRecord
 
   def policies
     if suspend?
-      :suspend
+      [:suspend]
     else
       [severity.to_sym, reject_media? ? :reject_media : nil, reject_reports? ? :reject_reports : nil].reject { |policy| policy == :noop || policy.nil? }
     end