mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-14 15:52:18 -06:00
Force 48-bit MAC format for proper error messages during validation
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user