From 90fa7db13c31009821449ebf08038e91a510ddb2 Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Thu, 17 Jul 2025 18:52:41 +0530 Subject: [PATCH] fix: add validation for account key (cherry picked from commit b6da350c201ff91dfe7dcb887b60d0dba1f0bd95) --- erpnext/accounts/report/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 796c8c75ad2..136a0acbbb0 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -101,7 +101,7 @@ def convert_to_presentation_currency(gl_entries, currency_info, filters=None): account_currencies = list(set(entry["account_currency"] for entry in gl_entries)) exchange_gain_or_loss = False - if filters: + if filters and isinstance(filters.get("account"), list): account_filter = filters.get("account") gain_loss_account = frappe.db.get_value("Company", filters.company, "exchange_gain_loss_account")