chore: validation for none type object

This commit is contained in:
khushi8112
2025-10-01 16:30:06 +05:30
parent 95877e73f0
commit 0373f7f33f

View File

@@ -603,7 +603,7 @@ class Company(NestedSet):
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)