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

Merge branch 'fix-keyerror' into 'master'

Fix keyerror on registration

See merge request !63
parents 47d7761f cc0ad940
No related branches found
No related tags found
1 merge request!63Fix keyerror on registration
Pipeline #192476 canceled
......@@ -311,7 +311,10 @@ class AccountRegisterWizardView(SessionWizardView):
initial = self.initial_dict.get(step, {})
if step == "register":
cleaned_data_email = self.get_cleaned_data_for_step("email")
try:
cleaned_data_email = self.get_cleaned_data_for_step("email")
except KeyError: # FIXME
cleaned_data_email = False
if cleaned_data_email:
domain = cleaned_data_email["domain"]
email = f"{cleaned_data_email['local_part']}@{domain.domain}"
......@@ -338,7 +341,10 @@ class AccountRegisterWizardView(SessionWizardView):
def done(self, form_list, **kwargs):
context = {}
cleaned_data_email = self.get_cleaned_data_for_step("email")
try:
cleaned_data_email = self.get_cleaned_data_for_step("email")
except KeyError: # FIXME
cleaned_data_email = False
cleaned_data_register = self.get_cleaned_data_for_step("register")
# Create email address
......@@ -474,7 +480,10 @@ class RegisterEventWizardView(SessionWizardView):
initial = self.initial_dict.get(step, {})
if step == "register":
cleaned_data_email = self.get_cleaned_data_for_step("email")
try:
cleaned_data_email = self.get_cleaned_data_for_step("email")
except KeyError:
cleaned_data_email = False
if cleaned_data_email:
domain = cleaned_data_email["domain"]
email = f"{cleaned_data_email['local_part']}@{domain.domain}"
......
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