Commit 6dbfbb89 authored by Maël Kervella's avatar Maël Kervella Committed by Pierre Cadart

Dégage filtre de mac valide inutile et incomplet

parent b53c5024
......@@ -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']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment