Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Review changes
Michał Sipab3d0d391e24f
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.pyindex 1255ef02b5..30fb50b527 100644--- a/saleor/graphql/checkout/types.py+++ b/saleor/graphql/checkout/types.py@@ -110,7 +110,7 @@ class Checkout(CountableDjangoObjectType):TaxedMoney,description="The price of the checkout before shipping, with taxes included.",)- token = graphene.Field(UUID, description=("UUID of checkout."))+ token = graphene.Field(UUID, description=("UUID of checkout."), required=True)total_price = graphene.Field(TaxedMoney,description=(diff --git a/saleor/graphql/product/types/digital_contents.py b/saleor/graphql/product/types/digital_contents.pyindex 8d48400b9f..bdad5aa891 100644--- a/saleor/graphql/product/types/digital_contents.py+++ b/saleor/graphql/product/types/digital_contents.py@@ -12,7 +12,9 @@ from ...meta.types import ObjectWithMetadataclass DigitalContentUrl(CountableDjangoObjectType):url = graphene.String(description="URL for digital content.")- token = graphene.Field(UUID, description=("UUID of digital content."))+ token = graphene.Field(+ UUID, description=("UUID of digital content."), required=True+ )class Meta:model = models.DigitalContentUrldiff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 6b78088577..7a2c14480d 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -779,7 +779,7 @@ type Checkout implements Node & ObjectWithMetadata {lines: [CheckoutLine]shippingPrice: TaxedMoneysubtotalPrice: TaxedMoney- token: UUID+ token: UUID!totalPrice: TaxedMoney}@@ -1614,7 +1614,7 @@ type DigitalContentUrl implements Node {downloadNum: Int!id: ID!url: String- token: UUID+ token: UUID!}type DigitalContentUrlCreate {diff --git a/tests/api/test_scalars.py b/tests/api/test_scalars.pyindex ca42400d37..c1a1cdbcfa 100644--- a/tests/api/test_scalars.py+++ b/tests/api/test_scalars.py@@ -1,6 +1,13 @@-from tests.api.test_checkout import QUERY_CHECKOUTfrom tests.api.utils import get_graphql_content+QUERY_CHECKOUT = """+query getCheckout($token: UUID!) {+ checkout(token: $token) {+ token+ }+}+"""+def test_uuid_scalar_value_passed_as_variable(api_client, checkout):variables = {"token": str(checkout.token)}