mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 04:58:16 -06:00
rename ipnet var to ip_networks
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
This commit is contained in:
parent
de417a0296
commit
a4cd082c39
@ -250,8 +250,8 @@ class Token(BigIDModel):
|
||||
except ValueError:
|
||||
raise ValidationError(f"{raw_ip_address} is an invalid IP address")
|
||||
|
||||
for ipnet in self.allowed_ips:
|
||||
if ip_address in ipaddress.ip_network(ipnet):
|
||||
for ip_network in self.allowed_ips:
|
||||
if ip_address in ipaddress.ip_network(ip_network):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user