Skip to content

Commit

Permalink
fix: failing tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vishakhdesai committed Dec 19, 2024
1 parent 6b847cd commit 2ce0786
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def subtract_allocations(gl_account, vouchers):
voucher_allocated_amounts = get_total_allocated_amount(voucher_docs)

for voucher in vouchers:
rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name")))
rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) or []
filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows))

if amount := None if not filtered_row else filtered_row[0]["total"]:
Expand Down

0 comments on commit 2ce0786

Please sign in to comment.