0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #4493 from jaswilli/settings-migration

Fix updateConfigTheme method.
This commit is contained in:
Matt Enlow 2014-11-20 11:50:32 -07:00
commit 1a42f32561
2 changed files with 5 additions and 5 deletions

View file

@ -37,10 +37,10 @@ var _ = require('lodash'),
updateConfigTheme = function () { updateConfigTheme = function () {
config.set({ config.set({
theme: { theme: {
title: settingsCache.title.value || '', title: (settingsCache.title && settingsCache.title.value) || '',
description: settingsCache.description.value || '', description: (settingsCache.description && settingsCache.description.value) || '',
logo: settingsCache.logo.value || '', logo: (settingsCache.logo && settingsCache.logo.value) || '',
cover: settingsCache.cover.value || '' cover: (settingsCache.cover && settingsCache.cover.value) || ''
} }
}); });
}; };

View file

@ -48,7 +48,7 @@ addColumnCommands = function addColumnCommands(table, columns) {
modifyUniqueCommands = function modifyUniqueCommands(table, indexes) { modifyUniqueCommands = function modifyUniqueCommands(table, indexes) {
var columnKeys = _.keys(schema[table]); var columnKeys = _.keys(schema[table]);
return _.map(columnKeys, function (column) { 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')) { if (!_.contains(indexes, table + '_' + column + '_unique')) {
return function () { return function () {
logInfo('Adding unique on: ' + table + '.' + column); logInfo('Adding unique on: ' + table + '.' + column);