mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 07:28:39 +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():
|
def setup_currency_exchange():
|
||||||
ces = frappe.get_single("Currency Exchange Settings")
|
ces = frappe.get_single("Currency Exchange Settings")
|
||||||
try:
|
try:
|
||||||
ces.set("result_key", [])
|
ces.service_provider = "frankfurter.dev - v2"
|
||||||
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.save()
|
ces.save()
|
||||||
except frappe.ValidationError:
|
except frappe.ValidationError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user