From a4cd082c39073e1a4b25dd61d9b47e649582b8c0 Mon Sep 17 00:00:00 2001 From: PieterL75 <74899468+PieterL75@users.noreply.github.com> Date: Fri, 18 Mar 2022 08:58:52 +0100 Subject: [PATCH] rename ipnet var to ip_networks Co-authored-by: Jeremy Stretch --- netbox/users/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/users/models.py b/netbox/users/models.py index 62a081335..3486d0793 100644 --- a/netbox/users/models.py +++ b/netbox/users/models.py @@ -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