Skip to content

Commit 4099b0a

Browse files
committed
Sentry error fix
1 parent c699263 commit 4099b0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django/mapswipe/graphql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def _scope_with_sentry(self, execute_func, *args, **kwargs) -> ExecutionResult:
3939
operation_name = kwargs.get("operation_name")
4040
with sentry_sdk.configure_scope() as scope:
4141
scope.set_tag("kind", operation_name)
42-
scope.transaction.name = operation_name
42+
if scope.transaction:
43+
scope.transaction.name = operation_name
4344
return execute_func(*args, **kwargs)
4445

4546
def execute_sync(self, *args, **kwargs) -> ExecutionResult:

0 commit comments

Comments
 (0)