mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Fix groups displayed on user profile group edition
This commit is contained in:
@ -35,7 +35,6 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.db.models import DateField, QuerySet
|
||||
from django.db.models.functions import Trunc
|
||||
from django.forms import CheckboxSelectMultiple
|
||||
from django.forms.models import modelform_factory
|
||||
from django.http import Http404
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
@ -69,6 +68,7 @@ from core.views.forms import (
|
||||
RegisteringForm,
|
||||
UserGodfathersForm,
|
||||
UserProfileForm,
|
||||
UserRealGroupForm,
|
||||
)
|
||||
from counter.models import Refilling, Selling
|
||||
from counter.views.student_card import StudentCardFormView
|
||||
@ -583,9 +583,7 @@ class UserUpdateGroupView(UserTabsMixin, CanEditPropMixin, UpdateView):
|
||||
model = User
|
||||
pk_url_kwarg = "user_id"
|
||||
template_name = "core/user_group.jinja"
|
||||
form_class = modelform_factory(
|
||||
User, fields=["groups"], widgets={"groups": CheckboxSelectMultiple}
|
||||
)
|
||||
form_class = UserRealGroupForm
|
||||
context_object_name = "profile"
|
||||
current_tab = "groups"
|
||||
|
||||
|
Reference in New Issue
Block a user