django-login-history icon indicating copy to clipboard operation
django-login-history copied to clipboard

not working when ip is in the form ip:port

Open santoxyz opened this issue 2 years ago • 0 comments

web_1 | File "/usr/local/lib/python3.10/site-packages/django_login _history/models.py", line 47, in get_location_data__from_ip
web_1 | print(ipaddress.ip_address(ip).is_private)
web_1 | File "/usr/local/lib/python3.10/ipaddress.py", line 54, in ip_address
web_1 | raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
web_1 | ValueError: '37.116.172.131:32830' does not appear to be an IPv4 or IPv6 address

santoxyz avatar Jul 15 '22 16:07 santoxyz