mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:03:43 +08:00
FIX: If there is an invalid locale in the site setting, default to en
This commit is contained in:
parent
94ceb06b02
commit
8cd0026cde
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue
Block a user