mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Include error type when an error occurs updating exchange rates (#4728)
- Will allow us to further introspect errors received by sentry
This commit is contained in:
parent
6bd95f3b15
commit
20d8c2b4e6
@ -148,7 +148,7 @@ class InvenTreeConfig(AppConfig):
|
||||
try:
|
||||
update_exchange_rates()
|
||||
except Exception as e:
|
||||
logger.error(f"Error updating exchange rates: {e}")
|
||||
logger.error(f"Error updating exchange rates: {e} ({type(e)})")
|
||||
|
||||
def add_user_on_startup(self):
|
||||
"""Add a user on startup."""
|
||||
|
@ -530,7 +530,7 @@ def update_exchange_rates():
|
||||
# Remove any exchange rates which are not in the provided currencies
|
||||
Rate.objects.filter(backend="InvenTreeExchange").exclude(currency__in=currency_codes()).delete()
|
||||
except Exception as e: # pragma: no cover
|
||||
logger.error(f"Error updating exchange rates: {e}")
|
||||
logger.error(f"Error updating exchange rates: {e} ({type(e)})")
|
||||
|
||||
|
||||
@scheduled_task(ScheduledTask.DAILY)
|
||||
|
Loading…
Reference in New Issue
Block a user