From badf1c42e043cc7f2962bbad0a817123dd6900b1 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 24 Jan 2019 16:28:53 +0530 Subject: [PATCH] chore: Add error logging for failed get_exchange_rate call --- erpnext/setup/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 0216c3ba69..01e0b7d441 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -109,6 +109,7 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No cache.setex(key, value, 6 * 60 * 60) return flt(value) except: + frappe.log_error(title="Get Exchange Rate") frappe.msgprint(_("Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually").format(from_currency, to_currency, transaction_date)) return 0.0