diff --git a/lib/admin/settings-loader.js b/lib/admin/settings-loader.js index ef5b2f2c..cb4bacf7 100644 --- a/lib/admin/settings-loader.js +++ b/lib/admin/settings-loader.js @@ -92,7 +92,7 @@ function loadLatestConfig (filterSchemaVersion = true) { order by id desc limit 1` - return db.one(sql, ['config', configValidate.SETTINGS_LOADER_SCHEMA_VERSION]) + return db.oneOrNone(sql, ['config', configValidate.SETTINGS_LOADER_SCHEMA_VERSION]) .then(row => row.data.config) .then(configValidate.validate) .catch(err => { diff --git a/lib/new-settings-loader.js b/lib/new-settings-loader.js index 09cb3e6a..76cd120c 100644 --- a/lib/new-settings-loader.js +++ b/lib/new-settings-loader.js @@ -167,7 +167,7 @@ function loadLatestConfig () { ORDER BY id DESC LIMIT 1` - return db.one(sql, [NEW_SETTINGS_LOADER_SCHEMA_VERSION]) + return db.oneOrNone(sql, [NEW_SETTINGS_LOADER_SCHEMA_VERSION]) .then(row => row ? row.data.config : {}) .catch(err => { throw err