1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Force 48-bit MAC format for proper error messages during validation

This commit is contained in:
Jeremy Stretch
2016-07-06 14:22:34 -04:00
parent 9793b406e9
commit cc17604220
2 changed files with 3 additions and 3 deletions

View File

@ -21,6 +21,6 @@ class MACAddressFormField(forms.Field):
return value
try:
return EUI(value)
return EUI(value, version=48)
except AddrFormatError:
raise ValidationError("Please specify a valid MAC address.")