mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 11:05:41 +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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user