From aea87735034acb48b7284f9c63d63ac0a3538771 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Sat, 15 May 2021 12:23:05 +0530 Subject: [PATCH] feat: Increase number of supported currency exchanges Switch from frankfurter.app to exchangerate.host to accomodate more currency usage. Closes #25603 --- erpnext/setup/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index ffd5ab1e840..e66b1b5331a 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -98,10 +98,10 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No if not value: import requests - api_url = "https://frankfurter.app/{0}".format(transaction_date) + api_url = "https://api.exchangerate.host/latest" response = requests.get(api_url, params={ - "base": from_currency, - "symbols": to_currency + "symbols": from_currency+","+to_currency, + "base": from_currency }) # expire in 6 hours response.raise_for_status()