Skip to content

Commit 1747e8c

Browse files
authored
Merge branch 'master' into byk/fix/spotlight-url-django
2 parents 29b3ede + 1239499 commit 1747e8c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sentry_sdk/spotlight.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ def setup_spotlight(options):
211211
if not isinstance(url, str):
212212
return None
213213

214-
if (
215-
settings is not None
216-
and settings.DEBUG
217-
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_ON_ERROR", "1"))
218-
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_MIDDLEWARE", "1"))
219-
):
220-
with capture_internal_exceptions():
214+
with capture_internal_exceptions():
215+
if (
216+
settings is not None
217+
and settings.DEBUG
218+
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_ON_ERROR", "1"))
219+
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_MIDDLEWARE", "1"))
220+
):
221221
middleware = settings.MIDDLEWARE
222222
if DJANGO_SPOTLIGHT_MIDDLEWARE_PATH not in middleware:
223223
settings.MIDDLEWARE = type(middleware)(

0 commit comments

Comments
 (0)