Refined newsletter import sanitisation

refs https://github.com/TryGhost/Team/issues/1529

- simplifies the sanitisation method to delete ignored columns
This commit is contained in:
Rishabh 2022-05-09 12:32:25 +05:30
parent f5d4174e0d
commit 95fc22e6fe

View File

@ -17,8 +17,8 @@ class NewslettersImporter extends BaseImporter {
*/
sanitizeValues() {
_.each(this.dataToImport, (obj) => {
_.each(_.pick(obj, ignoredColumns), (value, key) => {
delete obj[key];
ignoredColumns.forEach((column) => {
delete obj[column];
});
});
}