From 6a891048a87ae570fb50aa62006945067262f9e6 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Wed, 1 Oct 2025 16:30:06 +0530 Subject: [PATCH] chore: validation for none type object --- erpnext/setup/doctype/company/company.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 7cbde082b6a..a67786b0ebc 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -548,8 +548,9 @@ class Company(NestedSet): "Company", self.parent_company, ["reporting_currency"] ) self.reporting_currency = parent_reporting_currency + def validate_pending_reposts(self, old_doc): - if old_doc.accounts_frozen_till_date != self.accounts_frozen_till_date: + if old_doc and old_doc.accounts_frozen_till_date != self.accounts_frozen_till_date: if self.accounts_frozen_till_date: check_pending_reposting(self.accounts_frozen_till_date)