Skip to content

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

Make user_email not required in Graphql schema

Pacu2581355ed1a37
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
index d21db85f87..555ef0dce9 100644
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -98,6 +98,8 @@ class Order(CountableDjangoObjectType):
events = graphene.List(
OrderEvent,
description='List of events associated with the order.')
+ user_email = graphene.String(
+ required=False, description='Email address of the customer.')
class Meta:
description = 'Represents an order in the shop.'
@@ -157,6 +159,7 @@ class Order(CountableDjangoObjectType):
return obj.user_email
if obj.user_id:
return obj.user.email
+ return None
class OrderLine(CountableDjangoObjectType):