mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Improve error handling when updating currency exchange (#5939)
- Suppress output for expected error conditions
This commit is contained in:
parent
52b01b09bf
commit
829d427a76
@ -553,7 +553,7 @@ def update_exchange_rates(force: bool = False):
|
|||||||
# Record successful task execution
|
# Record successful task execution
|
||||||
record_task_success('update_exchange_rates')
|
record_task_success('update_exchange_rates')
|
||||||
|
|
||||||
except OperationalError:
|
except (AppRegistryNotReady, OperationalError, ProgrammingError):
|
||||||
logger.warning("Could not update exchange rates - database not ready")
|
logger.warning("Could not update exchange rates - database not ready")
|
||||||
except Exception as e: # pragma: no cover
|
except Exception as e: # pragma: no cover
|
||||||
logger.exception("Error updating exchange rates: %s", str(type(e)))
|
logger.exception("Error updating exchange rates: %s", str(type(e)))
|
||||||
|
Loading…
Reference in New Issue
Block a user