mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Ignored member email settings in import
no issue - Member email settings - newsletter and support - was previously being set to null for all cases, which can lead to `null` values being set for those addresses on a successful import whereas the expected behavior is to retain the old values. - Adds the 2 email settings to ignored settings list so they are not changed during import process
This commit is contained in:
parent
54e638310c
commit
3e0948d04e
@ -8,7 +8,7 @@ const keyGroupMapper = require('../../../../api/shared/serializers/input/utils/s
|
||||
const keyTypeMapper = require('../../../../api/shared/serializers/input/utils/settings-key-type-mapper');
|
||||
|
||||
const labsDefaults = JSON.parse(defaultSettings.labs.labs.defaultValue);
|
||||
const ignoredSettings = ['active_apps', 'installed_apps'];
|
||||
const ignoredSettings = ['active_apps', 'installed_apps', 'members_from_address', 'members_support_address'];
|
||||
const deprecatedSupportedSettingsMap = {
|
||||
default_locale: 'lang',
|
||||
active_timezone: 'timezone',
|
||||
@ -75,7 +75,7 @@ class SettingsImporter extends BaseImporter {
|
||||
});
|
||||
}
|
||||
|
||||
// Don't import any old, deprecated settings
|
||||
// Don't import any old, deprecated or excluded settings
|
||||
this.dataToImport = _.filter(this.dataToImport, (data) => {
|
||||
return !_.includes(ignoredSettings, data.key);
|
||||
});
|
||||
@ -110,7 +110,7 @@ class SettingsImporter extends BaseImporter {
|
||||
const oldIsPrivate = _.find(this.existingData, {key: 'is_private'});
|
||||
|
||||
this.dataToImport = _.filter(this.dataToImport, (data) => {
|
||||
return data.key !== 'is_private';
|
||||
return !_.includes([['is_private']], data.key);
|
||||
});
|
||||
|
||||
this.dataToImport = _.filter(this.dataToImport, (data) => {
|
||||
|
Loading…
Reference in New Issue
Block a user