From 1ddc86d6a31f80757372e01b54f09f8d3a4fd322 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 4 Apr 2023 14:54:40 +1000 Subject: [PATCH] Don't log to sentry in debug mode (#4576) --- InvenTree/InvenTree/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/exceptions.py b/InvenTree/InvenTree/exceptions.py index 1b61d36b87..a7bcf9d39c 100644 --- a/InvenTree/InvenTree/exceptions.py +++ b/InvenTree/InvenTree/exceptions.py @@ -61,7 +61,7 @@ def exception_handler(exc, context): """ response = None - if settings.SENTRY_ENABLED and settings.SENTRY_DSN: + if settings.SENTRY_ENABLED and settings.SENTRY_DSN and not settings.DEBUG: # Report this exception to sentry.io from sentry_sdk import capture_exception capture_exception(exc)