Stop using deprecated implicit_prefix option
This argument was deprecated in netaddr 0.10.0[1], and was removed in netaddr 1.0.0[2]. [1]aca2f56344
[2]cc42742247
Change-Id: I24f26ee44af8fdfca89312351e67e5edbf7c81de
This commit is contained in:
parent
313a5afa6a
commit
564507a72a
|
@ -106,7 +106,7 @@ class CIDRConstraint(constraints.BaseCustomConstraint):
|
|||
|
||||
def validate(self, value, context, template=None):
|
||||
try:
|
||||
netaddr.IPNetwork(value, implicit_prefix=True)
|
||||
netaddr.IPNetwork(netaddr.cidr_abbrev_to_verbose(value))
|
||||
msg = validators.validate_subnet(value)
|
||||
if msg is not None:
|
||||
self._error_message = msg
|
||||
|
|
Loading…
Reference in New Issue