diff --git a/core/server/api/settings.js b/core/server/api/settings.js index bcfa735204..ce9ab057de 100644 --- a/core/server/api/settings.js +++ b/core/server/api/settings.js @@ -37,10 +37,10 @@ var _ = require('lodash'), updateConfigTheme = function () { config.set({ theme: { - title: settingsCache.title.value || '', - description: settingsCache.description.value || '', - logo: settingsCache.logo.value || '', - cover: settingsCache.cover.value || '' + title: (settingsCache.title && settingsCache.title.value) || '', + description: (settingsCache.description && settingsCache.description.value) || '', + logo: (settingsCache.logo && settingsCache.logo.value) || '', + cover: (settingsCache.cover && settingsCache.cover.value) || '' } }); }; diff --git a/core/server/data/migration/commands.js b/core/server/data/migration/commands.js index 17a88250e8..dfbd88c76e 100644 --- a/core/server/data/migration/commands.js +++ b/core/server/data/migration/commands.js @@ -48,7 +48,7 @@ addColumnCommands = function addColumnCommands(table, columns) { modifyUniqueCommands = function modifyUniqueCommands(table, indexes) { var columnKeys = _.keys(schema[table]); return _.map(columnKeys, function (column) { - if (schema[table][column].unique && schema[table][column].unique === true) { + if (schema[table][column].unique === true) { if (!_.contains(indexes, table + '_' + column + '_unique')) { return function () { logInfo('Adding unique on: ' + table + '.' + column);