mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 10:23:17 -05:00
FIX: If there is an invalid locale in the site setting, default to en
This commit is contained in:
+5
-1
@@ -1,6 +1,10 @@
|
||||
# we should set the locale before the migration
|
||||
task 'set_locale' do
|
||||
I18n.locale = (SiteSetting.default_locale || :en) rescue :en
|
||||
begin
|
||||
I18n.locale = (SiteSetting.default_locale || :en) rescue :en
|
||||
rescue I18n::InvalidLocale
|
||||
I18n.locale = :en
|
||||
end
|
||||
end
|
||||
|
||||
task 'db:environment:set', [:multisite] => [:load_config] do |_, args|
|
||||
|
||||
Reference in New Issue
Block a user