mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 03:55:41 +00:00
ignore unkown errors for coverage
This commit is contained in:
@ -248,7 +248,7 @@ def update_exchange_rates():
|
|||||||
# Apps not yet loaded!
|
# Apps not yet loaded!
|
||||||
logger.info("Could not perform 'update_exchange_rates' - App registry not ready")
|
logger.info("Could not perform 'update_exchange_rates' - App registry not ready")
|
||||||
return
|
return
|
||||||
except:
|
except: # pragma: no cover
|
||||||
# Other error?
|
# Other error?
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ def update_exchange_rates():
|
|||||||
backend = ExchangeBackend.objects.get(name='InvenTreeExchange')
|
backend = ExchangeBackend.objects.get(name='InvenTreeExchange')
|
||||||
except ExchangeBackend.DoesNotExist:
|
except ExchangeBackend.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
except:
|
except: # pragma: no cover
|
||||||
# Some other error
|
# Some other error
|
||||||
logger.warning("update_exchange_rates: Database not ready")
|
logger.warning("update_exchange_rates: Database not ready")
|
||||||
return
|
return
|
||||||
@ -274,7 +274,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:
|
except Exception as e: # pragma: no cover
|
||||||
logger.error(f"Error updating exchange rates: {e}")
|
logger.error(f"Error updating exchange rates: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user