From 21b2df41accea57653f39891ab0bd30b801ed6dc Mon Sep 17 00:00:00 2001 From: Gaurav Naik Date: Mon, 14 May 2018 18:15:47 +0530 Subject: [PATCH] [Fix] len() instead of .length --- erpnext/accounts/doctype/accounting_period/accounting_period.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index f2ba578965..32441db2c1 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -46,7 +46,7 @@ class AccountingPeriod(Document): return docs_for_closing def bootstrap_doctypes_for_closing(self): - if self.closed_documents.length == 0: + if len(self.closed_documents) == 0: for doctype_for_closing in self.get_doctypes_for_closing(): self.append('closed_documents', { "document_type": doctype_for_closing.document_type,