From fb70401d63b9c6e3b4047b7872aebdf4f6b6107f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pouilly?= Date: Mon, 5 Jul 2021 22:52:30 +0200 Subject: [PATCH] fix set --- preferences/forms.py | 4 ++-- topologie/forms.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/preferences/forms.py b/preferences/forms.py index 032290e4..cc25c3d6 100644 --- a/preferences/forms.py +++ b/preferences/forms.py @@ -398,7 +398,7 @@ class RadiusKeyForm(FormRevMixin, ModelForm): def save(self, commit=True): instance = super().save(commit) - instance.switch_set = self.cleaned_data["members"] + instance.switch_set.set(self.cleaned_data["members"]) return instance @@ -424,7 +424,7 @@ class SwitchManagementCredForm(FormRevMixin, ModelForm): def save(self, commit=True): instance = super().save(commit) - instance.switch_set = self.cleaned_data["members"] + instance.switch_set.set(self.cleaned_data["members"]) return instance diff --git a/topologie/forms.py b/topologie/forms.py index 717cee2c..f270cc51 100644 --- a/topologie/forms.py +++ b/topologie/forms.py @@ -225,7 +225,7 @@ class EditModelSwitchForm(FormRevMixin, ModelForm): def save(self, commit=True): instance = super().save(commit) - instance.switch_set = self.cleaned_data["members"] + instance.switch_set.set(self.cleaned_data["members"]) return instance @@ -266,7 +266,7 @@ class EditSwitchBayForm(FormRevMixin, ModelForm): def save(self, commit=True): instance = super().save(commit) - instance.switch_set = self.cleaned_data["members"] + instance.switch_set.set(self.cleaned_data["members"]) return instance