mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34187 -- Made UserCreationForm save many-to-many fields.
This commit is contained in:
committed by
Mariusz Felisiak
parent
60a7bd8986
commit
9d726c7902
@@ -141,6 +141,8 @@ class UserCreationForm(forms.ModelForm):
|
||||
user.set_password(self.cleaned_data["password1"])
|
||||
if commit:
|
||||
user.save()
|
||||
if hasattr(self, "save_m2m"):
|
||||
self.save_m2m()
|
||||
return user
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user