skip useless checks when creating a subscription for a new member

This commit is contained in:
imperosol
2025-03-12 13:22:22 +01:00
parent 7f2ee24cb9
commit 8a38ebb09d
2 changed files with 12 additions and 1 deletions

View File

@ -94,6 +94,13 @@ class SubscriptionNewUserForm(SubscriptionForm):
return email
def clean(self) -> dict[str, Any]:
"""Initialize the [User][core.models.User] linked to this subscription.
Warning:
The `User` is initialized, but not saved.
Don't use it for operations that expect
a persisted object.
"""
member = User(
first_name=self.cleaned_data.get("first_name"),
last_name=self.cleaned_data.get("last_name"),