Skip to content

Commit

Permalink
πŸ› Fixed private blogging getting enabled after import
Browse files Browse the repository at this point in the history
refs TryGhost#10582

- Importer should do similar conversion introduced in 04c60b4
  • Loading branch information
naz committed Mar 7, 2019
1 parent e2757d1 commit 942324b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/server/data/importer/importers/data/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ class SettingsImporter extends BaseImporter {
if (obj.key === 'slack') {
obj.value = JSON.stringify([{url: ''}]);
}

// CASE: export files might contain "0" or "1" for booleans
// transform "0" to false
// transform "false" to false
// transform "null" to null
if (obj.value === '0' || obj.value === '1') {
obj.value = !!+obj.value;
}
});

return super.beforeImport();
Expand Down

0 comments on commit 942324b

Please sign in to comment.