FIX: Reset watched site settings when default locale changes

FIX: Reset watched site settings when default locale changes

Some site settings (e.g. unicode_username_character_whitelist) depend on the default locale, so we need to reset the watched settings when the locale changes.

diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb
index f0be63c..703dce9 100644
--- a/app/models/site_setting.rb
+++ b/app/models/site_setting.rb
@@ -112,6 +112,7 @@ class SiteSetting < ActiveRecord::Base
   end
 
   WATCHED_SETTINGS ||= [
+    :default_locale,
     :attachment_content_type_blacklist,
     :attachment_filename_blacklist,
     :unicode_username_character_whitelist,

GitHub sha: f82576de

1 Like