Fix missing ipaddress
This commit is contained in:
parent
6f67b855ac
commit
b62b8af1cd
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ class LoginRequiredMiddleware:
|
|||
# Check against ranges
|
||||
if hasattr(settings, 'LOGIN_EXEMPT_IP_RANGE'):
|
||||
for ip_range in settings.LOGIN_EXEMPT_IP_RANGE:
|
||||
net = ip_network(ip_range)
|
||||
net = ipaddress.ip_network(ip_range)
|
||||
if ip in net:
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue