Fix another 2.2 deprecation

This commit is contained in:
Ludovic Stephan 2019-06-03 20:42:21 +02:00
parent 018865967d
commit 173affd8eb

View file

@ -202,9 +202,9 @@ class UserProfileAdmin(UserAdmin):
| Q(content_type__app_label="bda")
| (Q(content_type__app_label="auth") & Q(content_type__model="user"))
)
cof_group.permissions = perms
cof_group.permissions.set(perms)
# On y associe les membres du Burô
cof_group.user_set = User.objects.filter(profile__is_buro=True)
cof_group.user_set.set(User.objects.filter(profile__is_buro=True))
# Sauvegarde
cof_group.save()
# le Burô est staff et appartient au groupe COF