2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 20:46:47 +00:00

beeing safe with wrong / unknown setttings

This commit is contained in:
Matthias 2021-05-22 14:55:05 +02:00
parent 53ce848145
commit 4503f23ae4

View File

@ -13,8 +13,10 @@ def get_exchange_rate_backend():
if 'InvenTreeManualExchangeBackend' in inventree_settings.EXCHANGE_BACKEND: if 'InvenTreeManualExchangeBackend' in inventree_settings.EXCHANGE_BACKEND:
return InvenTreeManualExchangeBackend() return InvenTreeManualExchangeBackend()
else: elif 'InvenTreeFixerExchangeBackend' in inventree_settings.EXCHANGE_BACKEND:
return InvenTreeFixerExchangeBackend() return InvenTreeFixerExchangeBackend()
else:
raise ImproperlyConfigured('Exchange Backend wrongly configured')
class InvenTreeManualExchangeBackend(BaseExchangeBackend): class InvenTreeManualExchangeBackend(BaseExchangeBackend):