registration_backend/forms: do not overwrite the username if it's a field of the form
This commit is contained in:
parent
246843f958
commit
0aa54d1af7
|
@ -157,7 +157,7 @@ class RegistrationCompletionForm(forms.UserAttributeFormMixin, Form):
|
|||
continue
|
||||
if field.startswith('password'):
|
||||
continue
|
||||
if field == 'username':
|
||||
if field == 'username' and not self.cleaned_data.get('username'):
|
||||
kwargs[field] = uuid4().get_hex()[:30]
|
||||
user_fields[field] = kwargs[field]
|
||||
if field == 'email':
|
||||
|
|
Loading…
Reference in New Issue