diff --git a/InvenTree/InvenTree/tasks.py b/InvenTree/InvenTree/tasks.py index d089ae7157..c156d421ab 100644 --- a/InvenTree/InvenTree/tasks.py +++ b/InvenTree/InvenTree/tasks.py @@ -248,7 +248,7 @@ def update_exchange_rates(): # Apps not yet loaded! logger.info("Could not perform 'update_exchange_rates' - App registry not ready") return - except: + except: # pragma: no cover # Other error? return @@ -257,7 +257,7 @@ def update_exchange_rates(): backend = ExchangeBackend.objects.get(name='InvenTreeExchange') except ExchangeBackend.DoesNotExist: pass - except: + except: # pragma: no cover # Some other error logger.warning("update_exchange_rates: Database not ready") return @@ -274,7 +274,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: + except Exception as e: # pragma: no cover logger.error(f"Error updating exchange rates: {e}")