#34187: UserCreationForm should save data from ManyToMany form fields
-------------------------------------+-------------------------------------
               Reporter:  Mark       |          Owner:  Mark Gensler
  Gensler                            |
                   Type:  New        |         Status:  assigned
  feature                            |
              Component:             |        Version:  4.1
  contrib.admin                      |       Keywords:  UserCreationForm
               Severity:  Normal     |  save_m2m
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 When using `contrib.auth.forms.UserCreationForm` with a custom User model
 which has `ManyToManyField` fields, the data in all related form fields
 (e.g. a `ModelMultipleChoiceField`) is not saved.

 This is because unlike its parent class `django.forms.ModelForm`,
 `UserCreationForm.save(commit=True)` omits to call `self.save_m2m()`.

 This has been discussed on the #django-developers mailing list
 [https://groups.google.com/u/1/g/django-developers/c/2jj-ecoBwE4] and I'm
 ready to work on a PR.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34187>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184b9b2adaa-a267ae4f-a4a7-454c-a43f-e915f561804a-000000%40eu-central-1.amazonses.com.

Reply via email to