8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Remove state_sync : est appellé en post-save de user

This commit is contained in:
Gabriel Detraz 2020-04-17 19:18:11 +02:00
parent 2a4bd6bd79
commit bef496b3e2

View file

@ -682,14 +682,6 @@ class StateForm(FormRevMixin, ModelForm):
prefix = kwargs.pop("prefix", self.Meta.model.__name__) prefix = kwargs.pop("prefix", self.Meta.model.__name__)
super(StateForm, self).__init__(*args, prefix=prefix, **kwargs) 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): class GroupForm(FieldPermissionFormMixin, FormRevMixin, ModelForm):
""" Gestion des groupes d'un user""" """ Gestion des groupes d'un user"""