diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index e6d5040a2a..f4ead49abb 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -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|