2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

Improve error handling when updating currency exchange (#5939)

- Suppress output for expected error conditions
This commit is contained in:
Oliver
2023-11-20 13:14:16 +11:00
committed by GitHub
parent 52b01b09bf
commit 829d427a76

View File

@ -553,7 +553,7 @@ def update_exchange_rates(force: bool = False):
# Record successful task execution
record_task_success('update_exchange_rates')
except OperationalError:
except (AppRegistryNotReady, OperationalError, ProgrammingError):
logger.warning("Could not update exchange rates - database not ready")
except Exception as e: # pragma: no cover
logger.exception("Error updating exchange rates: %s", str(type(e)))