Skip to content

Commit cc69ef1

Browse files
committed
fix type and access errors
1 parent ae2ef79 commit cc69ef1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sentry_sdk/spotlight.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(self, get_response):
104104
@property
105105
def spotlight_script(self):
106106
# type: (Self) -> Optional[str]
107-
if self._spotlight_script is None:
107+
if self._spotlight_url is not None and self._spotlight_script is None:
108108
try:
109109
spotlight_js_url = urllib.parse.urljoin(
110110
self._spotlight_url, SPOTLIGHT_JS_ENTRY_PATH
@@ -174,7 +174,7 @@ def process_response(self, _request, response):
174174

175175
def process_exception(self, _request, exception):
176176
# type: (Self, HttpRequest, Exception) -> Optional[HttpResponseServerError]
177-
if not settings.DEBUG:
177+
if not settings.DEBUG or not self._spotlight_url:
178178
return None
179179

180180
try:

0 commit comments

Comments
 (0)