FIX: If there is an invalid locale in the site setting, default to en

This commit is contained in:
Robin Ward 2017-11-16 10:58:09 -05:00
parent 94ceb06b02
commit 8cd0026cde
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,10 @@
# we should set the locale before the migration
task 'set_locale' do
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|