mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Fix updateConfigTheme method.
No Issue - Fix exception being thrown when updateConfigTheme called before settingsCache fully populated. - Remove unnecessary check in a conditional in the migration command builder.
This commit is contained in:
parent
0c38a839b0
commit
b31fec6e2f
@ -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) || ''
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user