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:
Takashi Kajinami 2024-02-17 12:51:24 +09:00
parent 313a5afa6a
commit 564507a72a
1 changed files with 1 additions and 1 deletions

View File

@ -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