mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
fix: don't set empty values
This commit is contained in:
parent
e9b52c8d1b
commit
eade5770b0
@ -350,7 +350,6 @@ export class Importer {
|
||||
}
|
||||
}
|
||||
|
||||
// return docObjs;
|
||||
return Object.keys(docMap).map((k) => docMap[k]);
|
||||
}
|
||||
|
||||
@ -363,8 +362,15 @@ export class Importer {
|
||||
delete docObj.name;
|
||||
}
|
||||
|
||||
const doc = frappe.getNewDoc(this.doctype);
|
||||
for (const key in docObj) {
|
||||
if (docObj[key] !== '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
delete docObj[key];
|
||||
}
|
||||
|
||||
const doc = frappe.getNewDoc(this.doctype);
|
||||
try {
|
||||
await doc.set(docObj);
|
||||
await doc.insert();
|
||||
|
Loading…
Reference in New Issue
Block a user