From 99d6e1b3817f8497682410d75a6732f3b54ea50b Mon Sep 17 00:00:00 2001 From: Daniel Radl Date: Mon, 18 Aug 2025 12:27:59 +0000 Subject: [PATCH] fix(document): is_child_table_same for new docs --- frappe/model/document.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frappe/model/document.py b/frappe/model/document.py index 148ecf2d9e..f95cfdbc9c 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -842,9 +842,13 @@ class Document(BaseDocument): def is_child_table_same(self, fieldname): """Validate child table is same as original table before saving""" + + if self.is_new(): + return False + + same = True value = self.get(fieldname) original_value = self._doc_before_save.get(fieldname) - same = True if len(original_value) != len(value): same = False