Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix mypy warning

Mikail KOCAKfc68149ee7d6
diff --git a/saleor/graphql/views.py b/saleor/graphql/views.py
index 91f7540b84..780f0b35fe 100644
--- a/saleor/graphql/views.py
+++ b/saleor/graphql/views.py
@@ -215,7 +215,9 @@ class GraphQLView(View):
if error:
return error
- span.log_kv({"query": document.document_string[:2000]})
+ if document is not None:
+ span.log_kv({"query": document.document_string[:2000]})
+
extra_options: Dict[str, Optional[Any]] = {}
if self.executor: