mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
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:
parent
f5d4174e0d
commit
95fc22e6fe
@ -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];
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user