diff --git a/app/models/trust_level_setting.rb b/app/models/trust_level_setting.rb index a9bb747f868..ad48613fe9e 100644 --- a/app/models/trust_level_setting.rb +++ b/app/models/trust_level_setting.rb @@ -9,7 +9,12 @@ class TrustLevelSetting < EnumSiteSetting def self.values levels = TrustLevel.all - @values ||= valid_values.map { |x| { name: "#{x}: #{levels[x.to_i].name}", value: x } } + @values ||= valid_values.map { |x| + { + name: x.is_a?(Integer) ? "#{x}: #{levels[x.to_i].name}" : x, + value: x + } + } end def self.valid_values