use setting for currency_code_default

This commit is contained in:
Matthias 2021-06-30 23:36:46 +02:00
parent 88f57a211f
commit 92645d790b

View File

@ -8,7 +8,6 @@ from __future__ import unicode_literals
from moneyed import CURRENCIES
import common.models
from django.conf import settings
def currency_code_default():
@ -16,7 +15,7 @@ def currency_code_default():
Returns the default currency code (or USD if not specified)
"""
code = settings.BASE_CURRENCY
code = common.models.InvenTreeSetting.get_setting('INVENTREE_DEFAULT_CURRENCY')
if code not in CURRENCIES:
code = 'USD'