From 8a1ba00ed9cea8da6390d3a52058a36af9a99074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Tue, 19 Sep 2017 20:08:32 +0000 Subject: [PATCH] =?UTF-8?q?D=C3=A9gage=20filtre=20de=20mac=20valide=20inut?= =?UTF-8?q?ile=20et=20incomplet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/forms.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/machines/forms.py b/machines/forms.py index c72026fe..cd4ac87d 100644 --- a/machines/forms.py +++ b/machines/forms.py @@ -60,12 +60,6 @@ class EditInterfaceForm(ModelForm): if "machine" in self.fields: self.fields['machine'].queryset = Machine.objects.all().select_related('user') - def clean(self): - data = super(EditInterfaceForm, self).clean() - mac = str(self.data['mac_address']) - if len(''.join(mac.replace("-",":").split(":"))) != 12: - self.add_error('mac_address', "Format de la mac incorrect") - class AddInterfaceForm(EditInterfaceForm): class Meta(EditInterfaceForm.Meta): fields = ['ipv4','mac_address','type','details']