diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 7b6d0daeba..c3e4c393e4 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -210,6 +210,8 @@ def get_parent_account(doctype, txt, searchfield, start, page_len, filters): def get_account_currency(account): """Helper function to get account currency""" + if not account: + return def generator(): account_currency, company = frappe.db.get_value("Account", account, ["account_currency", "company"]) if not account_currency: