mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: handling of key does not exists error
This commit is contained in:
@@ -150,7 +150,7 @@ def validate_accounts(file_name):
|
|||||||
accounts_dict = {}
|
accounts_dict = {}
|
||||||
for account in accounts:
|
for account in accounts:
|
||||||
accounts_dict.setdefault(account["account_name"], account)
|
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
|
accounts_dict[account["parent_account"]]["is_group"] = 1
|
||||||
|
|
||||||
message = validate_root(accounts_dict)
|
message = validate_root(accounts_dict)
|
||||||
|
|||||||
Reference in New Issue
Block a user