mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Merge pull request #2266 from sebgie/issue#2244
Fix problems from importing 0.4.0 file
This commit is contained in:
commit
028d396185
@ -112,13 +112,13 @@ function importUsers(ops, tableData, transaction) {
|
|||||||
|
|
||||||
function importSettings(ops, tableData, transaction) {
|
function importSettings(ops, tableData, transaction) {
|
||||||
// for settings we need to update individual settings, and insert any missing ones
|
// for settings we need to update individual settings, and insert any missing ones
|
||||||
// settings we MUST NOT update are the databaseVersion, dbHash, and activeTheme
|
// settings we MUST NOT update are 'core' and 'theme' settings
|
||||||
// as all of these will cause side effects which don't make sense for an import
|
// as all of these will cause side effects which don't make sense for an import
|
||||||
|
var blackList = ['core', 'theme'];
|
||||||
|
|
||||||
var blackList = ['databaseVersion', 'dbHash', 'activeTheme'];
|
|
||||||
tableData = stripProperties(['id'], tableData);
|
tableData = stripProperties(['id'], tableData);
|
||||||
tableData = _.filter(tableData, function (data) {
|
tableData = _.filter(tableData, function (data) {
|
||||||
return blackList.indexOf(data.key) === -1;
|
return blackList.indexOf(data.type) === -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
ops.push(models.Settings.edit(tableData, transaction)
|
ops.push(models.Settings.edit(tableData, transaction)
|
||||||
|
@ -192,7 +192,7 @@ function showUpdateNotification() {
|
|||||||
// Version 0.4 used boolean to indicate the need for an update. This special case is
|
// Version 0.4 used boolean to indicate the need for an update. This special case is
|
||||||
// translated to the version string.
|
// translated to the version string.
|
||||||
// TODO: remove in future version.
|
// TODO: remove in future version.
|
||||||
if (display.value === 'false' || display.value === 'true') {
|
if (display.value === 'false' || display.value === 'true' || display.value === '1' || display.value === '0') {
|
||||||
display.value = '0.4.0';
|
display.value = '0.4.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user