From 3cbab65e15ef4656233c989b2f8ab3e2ae2db34a Mon Sep 17 00:00:00 2001 From: "stravo1@mac" Date: Thu, 5 Feb 2026 09:16:50 +0530 Subject: [PATCH] fix: skip dunder prefixed fields while adding child docs to locals these include fields like __print_formats, __workflow_docs which do not actually contain child docs for the doctype. caused issue #18581 where the local print format doc was being unlinked from cur_frm while sycing as it also synced __print_formats. --- frappe/public/js/frappe/model/sync.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/public/js/frappe/model/sync.js b/frappe/public/js/frappe/model/sync.js index d3cf85eba8..9eb6788f3f 100644 --- a/frappe/public/js/frappe/model/sync.js +++ b/frappe/public/js/frappe/model/sync.js @@ -89,6 +89,7 @@ Object.assign(frappe.model, { // add child docs to locals if (!is_table) { for (var i in doc) { + if (i.startsWith("__")) continue; var value = doc[i]; if ($.isArray(value)) {