mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +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:
|
try:
|
||||||
update_exchange_rates()
|
update_exchange_rates()
|
||||||
except Exception as e:
|
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):
|
def add_user_on_startup(self):
|
||||||
"""Add a user on startup."""
|
"""Add a user on startup."""
|
||||||
|
@ -530,7 +530,7 @@ def update_exchange_rates():
|
|||||||
# Remove any exchange rates which are not in the provided currencies
|
# Remove any exchange rates which are not in the provided currencies
|
||||||
Rate.objects.filter(backend="InvenTreeExchange").exclude(currency__in=currency_codes()).delete()
|
Rate.objects.filter(backend="InvenTreeExchange").exclude(currency__in=currency_codes()).delete()
|
||||||
except Exception as e: # pragma: no cover
|
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)
|
@scheduled_task(ScheduledTask.DAILY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user