mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-17 11:52:38 +00:00
fix: use frankfurter v2 by default for new install
(cherry picked from commit 479f9f63c9)
This commit is contained in:
@@ -90,14 +90,7 @@ def set_single_defaults():
|
||||
def setup_currency_exchange():
|
||||
ces = frappe.get_single("Currency Exchange Settings")
|
||||
try:
|
||||
ces.set("result_key", [])
|
||||
ces.set("req_params", [])
|
||||
|
||||
ces.api_endpoint = "https://api.frankfurter.dev/v1/{transaction_date}"
|
||||
ces.append("result_key", {"key": "rates"})
|
||||
ces.append("result_key", {"key": "{to_currency}"})
|
||||
ces.append("req_params", {"key": "base", "value": "{from_currency}"})
|
||||
ces.append("req_params", {"key": "symbols", "value": "{to_currency}"})
|
||||
ces.service_provider = "frankfurter.dev - v2"
|
||||
ces.save()
|
||||
except frappe.ValidationError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user