3👍
If you use a form(ModelForm)
then the reason for disappearing group might be a form.save_m2m()
that is called after your user.save()
. For example, if you have an empty “groups” field in your form, save_m2m
just removes all groups from you user.
👤eXt
Source:stackexchange.com