mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05: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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue