Check for fields that are of the wrong type. Fix bug in ip_interface() validator thanks to this unittest
This commit is contained in:
@ -33,6 +33,8 @@ class IPInterfaceWithPrefixLength(Validator):
|
||||
network = ipaddress.ip_interface(value)
|
||||
except:
|
||||
return False
|
||||
if not isinstance(value, str):
|
||||
return False
|
||||
if not '/' in value:
|
||||
return False
|
||||
e = value.split('/')
|
||||
|
Reference in New Issue
Block a user