From 6d0c53d667752fcb8cfbb31177c4a9b76e0e564c Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 17 Apr 2020 19:18:11 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20state=5Fsync=20:=20est=20appell=C3=A9?= =?UTF-8?q?=20en=20post-save=20de=20user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/forms.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/users/forms.py b/users/forms.py index 68492937..441d645c 100644 --- a/users/forms.py +++ b/users/forms.py @@ -682,14 +682,6 @@ class StateForm(FormRevMixin, ModelForm): prefix = kwargs.pop("prefix", self.Meta.model.__name__) super(StateForm, self).__init__(*args, prefix=prefix, **kwargs) - def save(self, commit=True): - user = super(StateForm, self).save(commit=False) - if self.cleaned_data["state"]: - user.state = self.cleaned_data.get("state") - user.state_sync() - - user.save() - class GroupForm(FieldPermissionFormMixin, FormRevMixin, ModelForm): """ Gestion des groupes d'un user"""