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

View File

@ -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|