Skip to content

Commit

Permalink
fix: key error on consolidated financial report
Browse files Browse the repository at this point in the history
accounts with same name but different account number will throw key
error on consolidated report

(cherry picked from commit 6e8395c)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Sep 2, 2022
1 parent 0a3ac82 commit 20919c8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,11 @@ def get_accounts(root_type, companies):
):
if account.account_name not in added_accounts:
accounts.append(account)
added_accounts.append(account.account_name)
if account.account_number:
account_key = account.account_number + "-" + account.account_name
else:
account_key = account.account_name
added_accounts.append(account_key)

return accounts

Expand Down

0 comments on commit 20919c8

Please sign in to comment.