Skip to content

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

RedirectUrl on AccountRegister is not required anymore

Tomasz Szymański57fe35a5b297
diff --git a/saleor/graphql/account/mutations/account.py b/saleor/graphql/account/mutations/account.py
index 9dbb021606..8d8377e1b4 100644
--- a/saleor/graphql/account/mutations/account.py
+++ b/saleor/graphql/account/mutations/account.py
@@ -33,7 +33,7 @@ class AccountRegisterInput(graphene.InputObjectType):
description=(
"Base of frontend URL that will be needed to create confirmation URL."
),
- required=settings.ENABLE_ACCOUNT_CONFIRMATION_BY_EMAIL,
+ required=False,
)
@@ -74,6 +74,11 @@ class AccountRegister(ModelMutation):
raise ValidationError(
{"redirect_url": error}, code=AccountErrorCode.INVALID
)
+ except KeyError:
+ raise ValidationError(
+ {"redirect_url": "This field is required."},
+ code=AccountErrorCode.INVALID,
+ )
return super().clean_input(info, instance, data, input_cls=None)
@classmethod
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 1695048d52..e96c4a73e7 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -75,7 +75,7 @@ type AccountRegister {
input AccountRegisterInput {
email: String!
password: String!
- redirectUrl: String!
+ redirectUrl: String
}
type AccountRequestDeletion {