FIX: Do not cache translated trust level names in site settings (#11863)

There's no real need to cache these, and the caching can introduce
problems when different sites/users are using different locales.
This commit is contained in:
David Taylor 2021-01-27 14:31:19 +00:00 committed by GitHub
parent e1c0a003fe
commit 1ccb6583b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class TrustLevelSetting < EnumSiteSetting
def self.values
levels = TrustLevel.all
@values ||= valid_values.map { |x|
valid_values.map { |x|
{
name: x.is_a?(Integer) ? "#{x}: #{levels[x.to_i].name}" : x,
value: x