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:
Fabien O'Carroll 2019-04-15 12:10:10 +02:00 committed by Kevin Ansfield
parent 9e6733ecab
commit 32a4798d76
2 changed files with 16 additions and 1 deletions

View File

@ -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) {

View File

@ -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(() => {