mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Added skip of active/installed apps settings during import (#10681)
no issue - the `{active,installed}_apps` settings related to a very old, minimally implemented, unreleased, and problematic approach to custom apps - this is the first step towards full removal of the old "apps" concept Credits: Kacper Szurek
This commit is contained in:
parent
9e6733ecab
commit
32a4798d76
@ -38,6 +38,21 @@ class SettingsImporter extends BaseImporter {
|
||||
});
|
||||
}
|
||||
|
||||
const activeApps = _.find(this.dataToImport, {key: 'active_apps'});
|
||||
const installedApps = _.find(this.dataToImport, {key: 'installed_apps'});
|
||||
|
||||
if (activeApps || installedApps) {
|
||||
this.problems.push({
|
||||
message: 'Old settings for apps were not imported',
|
||||
help: this.modelName,
|
||||
context: JSON.stringify({activeApps, installedApps})
|
||||
});
|
||||
|
||||
this.dataToImport = _.filter(this.dataToImport, (data) => {
|
||||
return data.key !== 'active_apps' && data.key !== 'installed_apps';
|
||||
});
|
||||
}
|
||||
|
||||
const permalinks = _.find(this.dataToImport, {key: 'permalinks'});
|
||||
|
||||
if (permalinks) {
|
||||
|
@ -89,7 +89,7 @@ describe('DB API', () => {
|
||||
const jsonResponse = res.body;
|
||||
should.exist(jsonResponse.db);
|
||||
should.exist(jsonResponse.problems);
|
||||
jsonResponse.problems.should.have.length(3);
|
||||
jsonResponse.problems.should.have.length(4);
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user