Skip to content

Commit b1ad445

Browse files
authored
Merge pull request jimfunk#116 from tfromme/patch-1
Fix potential MacAddressField crash in DRF
2 parents 46d1d6e + 2b74170 commit b1ad445

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netfields/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def to_python(self, value):
108108

109109
try:
110110
return EUI(value, dialect=mac_unix_common)
111-
except (AddrFormatError, TypeError):
111+
except (AddrFormatError, IndexError, TypeError):
112112
raise ValidationError(self.error_messages['invalid'])
113113

114114
def widget_attrs(self, widget):

0 commit comments

Comments
 (0)