Fixed bug in registration form

This commit is contained in:
Claudio Maggioni (maggicl) 2019-04-28 13:00:10 +02:00
parent 718d6b7bba
commit e2e543f7e9

View file

@ -14,7 +14,7 @@ class RegistrationForm(UserCreationForm):
field_classes = {'username': UsernameField, 'email': forms.EmailField} field_classes = {'username': UsernameField, 'email': forms.EmailField}
def save(self, commit=True): def save(self, commit=True):
user = super(RegisterForm, self).save(commit=False) user = super(RegistrationForm, self).save(commit=False)
user.email = self.cleaned_data["email"] user.email = self.cleaned_data["email"]
if commit: if commit:
user.save() user.save()