FIX: Only add the trust level name for numeric trust levels

FIX: Only add the trust level name for numeric trust levels

Previously the TrustLevelAndStaffSetting would display ‘new user’ for staff/admin

diff --git a/app/models/trust_level_setting.rb b/app/models/trust_level_setting.rb
index a9bb747..ad48613 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

GitHub sha: b46b6e72

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/incorrect-description-in-site-setting-trust-level-dropdown-for-tags/106615/5