Merge pull request #14556 from resilient-tech/fix-bulk-update

fix: do not pop `doctype` and `docname`
This commit is contained in:
mergify[bot] 2021-10-23 13:11:17 +00:00 committed by GitHub
commit ceb7ec35e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,7 +278,7 @@ def bulk_update(docs):
for doc in docs:
doc.pop("flags", None)
try:
existing_doc = frappe.get_doc(doc.pop("doctype"), doc.pop("docname"))
existing_doc = frappe.get_doc(doc["doctype"], doc["docname"])
existing_doc.update(doc)
existing_doc.save()
except Exception: