fix: config migration

This commit is contained in:
Sérgio Salgado 2021-05-06 19:20:24 +01:00 committed by Josh Harvey
parent da0d25c040
commit f1af958056
2 changed files with 3 additions and 1 deletions

View file

@ -5,7 +5,7 @@ exports.up = function (next) {
settingsLoader.loadLatest()
.then(({ config }) => {
if (!_.isEmpty(config))
config.locale.timezone = '0:0'
config.locale_timezone = '0:0'
return settingsLoader.saveConfig(config)
})
.then(() => next())

View file

@ -121,6 +121,8 @@ const Locales = ({ name: SCREEN_KEY }) => {
const locale = config && !R.isEmpty(config) ? config : localeDefaults
const localeOverrides = locale.overrides ?? []
console.log(data)
const handleSave = it => {
const newConfig = toNamespace(SCREEN_KEY)(it.locale[0])