chore: validation for none type object

This commit is contained in:
khushi8112
2025-10-01 16:30:06 +05:30
parent 6d55b1801e
commit 6a891048a8

View File

@@ -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)