fix: add validation for account key

This commit is contained in:
l0gesh29
2025-07-17 18:52:41 +05:30
parent 4f90f50eb2
commit b6da350c20

View File

@@ -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")