Skip to content
Snippets Groups Projects
Commit ae055d22 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Connect email to person on account registration. Closes #44

parent dc3c2c8c
No related branches found
No related tags found
1 merge request!39Connect email to person on account registration. Closes #44
Pipeline #95488 failed
...@@ -347,6 +347,7 @@ class AccountRegisterWizardView(SessionWizardView): ...@@ -347,6 +347,7 @@ class AccountRegisterWizardView(SessionWizardView):
cleaned_data_register = self.get_cleaned_data_for_step("register") cleaned_data_register = self.get_cleaned_data_for_step("register")
# Create email address # Create email address
_email = None
if cleaned_data_email: if cleaned_data_email:
_email = MailAddress.objects.create( _email = MailAddress.objects.create(
local_part=cleaned_data_email["local_part"], local_part=cleaned_data_email["local_part"],
...@@ -374,6 +375,10 @@ class AccountRegisterWizardView(SessionWizardView): ...@@ -374,6 +375,10 @@ class AccountRegisterWizardView(SessionWizardView):
}, },
) )
if _email:
_email.person = person
_email.save()
return redirect("index") return redirect("index")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment