commit | a035428d43e0bce3a8dce8a8ccaaf5ed6867c52f | [log] [tgz] |
---|---|---|
author | Nabin Hait <nabinhait@gmail.com> | Tue Sep 10 14:50:55 2019 +0530 |
committer | Nabin Hait <nabinhait@gmail.com> | Tue Sep 10 14:51:02 2019 +0530 |
tree | 5ac7927bd24032a36139466d2946a3ad66f2e5a8 | |
parent | d2315e5c5c4c14b628371539351e86d6e39312cf [diff] |
fix: handling of key does not exists error
diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py index 4683c7a..9bf5887 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py
@@ -150,7 +150,7 @@ accounts_dict = {} for account in accounts: accounts_dict.setdefault(account["account_name"], account) - if account["parent_account"] and accounts_dict[account["parent_account"]]: + if account["parent_account"] and accounts_dict.get(account["parent_account"]): accounts_dict[account["parent_account"]]["is_group"] = 1 message = validate_root(accounts_dict)