mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Fix exchange rate updates (#5843)
- Handle base currencies which are not USD - API changed "base_currency" to "base"
This commit is contained in:
parent
5d55555394
commit
a7c0882c02
@ -51,7 +51,8 @@ class InvenTreeExchange(SimpleExchangeBackend):
|
|||||||
rates = super().get_rates(**params)
|
rates = super().get_rates(**params)
|
||||||
|
|
||||||
# Add the base currency to the rates
|
# Add the base currency to the rates
|
||||||
rates[params["base_currency"]] = Decimal("1.0")
|
base_currency = params.get('base', currency_code_default())
|
||||||
|
rates[base_currency] = Decimal("1.0")
|
||||||
|
|
||||||
return rates
|
return rates
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user