Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix failing checkout resolver on User (#18164)
Maciej Korycinskiaca84e6c4252
diff --git a/saleor/graphql/account/tests/mutations/account/test_account_register.py b/saleor/graphql/account/tests/mutations/account/test_account_register.pyindex fbaff90664..7858f08068 100644--- a/saleor/graphql/account/tests/mutations/account/test_account_register.py+++ b/saleor/graphql/account/tests/mutations/account/test_account_register.py@@ -38,6 +38,10 @@ mutation RegisterAccount($input: AccountRegisterInput!) {}metafield(key: "test")metafields(keys: ["test1"])+ checkout{+ id+ }+ checkoutTokenscheckoutIdscheckouts(first: 10) {edges {diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.pyindex e02a0d28e7..b30031ad86 100644--- a/saleor/graphql/account/types.py+++ b/saleor/graphql/account/types.py@@ -512,7 +512,7 @@ class User(ModelObjectType[models.User]):@staticmethoddef resolve_checkout(root: models.User, info: ResolveInfo):if is_newly_created_user(root):- return []+ return Nonedatabase_connection_name = get_database_connection_name(info.context)checkout = get_user_checkout(root, database_connection_name=database_connection_name