From 1c0843caeeff69e67b92de994ed71a739f3ea5dd Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Wed, 2 Oct 2024 10:06:44 +0200 Subject: [PATCH] fix: Fix API endpoint for Frankfurter (cherry picked from commit 33e72111c7d7f60dbe041282026f607230624f52) --- .../currency_exchange_settings/currency_exchange_settings.py | 2 +- erpnext/setup/install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py index 39aff032b3d..2af06a17367 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py +++ b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py @@ -84,7 +84,7 @@ def get_api_endpoint(service_provider: str | None = None, use_http: bool = False if service_provider == "exchangerate.host": api = "api.exchangerate.host/convert" elif service_provider == "frankfurter.app": - api = "frankfurter.app/{transaction_date}" + api = "api.frankfurter.app/{transaction_date}" protocol = "https://" if use_http: diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 2e26117ef33..dcf086f2d05 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -80,7 +80,7 @@ def setup_currency_exchange(): ces.set("result_key", []) ces.set("req_params", []) - ces.api_endpoint = "https://frankfurter.app/{transaction_date}" + ces.api_endpoint = "https://api.frankfurter.app/{transaction_date}" ces.append("result_key", {"key": "rates"}) ces.append("result_key", {"key": "{to_currency}"}) ces.append("req_params", {"key": "base", "value": "{from_currency}"})