mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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)
|
||||
|
||||
# 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user