diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 8fb3f36f28e..28038e9212a 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -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"]: