handle myip == '' (?myip= in url) - just get ip from REMOTE_ADDR
This commit is contained in:
parent
b818ea9df9
commit
93b54ab479
@ -220,7 +220,7 @@ class NicUpdateView(View):
|
|||||||
host.register_client_fault()
|
host.register_client_fault()
|
||||||
return Response('badagent')
|
return Response('badagent')
|
||||||
ipaddr = request.GET.get('myip')
|
ipaddr = request.GET.get('myip')
|
||||||
if ipaddr is None:
|
if not ipaddr: # None or ''
|
||||||
ipaddr = request.META.get('REMOTE_ADDR')
|
ipaddr = request.META.get('REMOTE_ADDR')
|
||||||
ssl = request.is_secure()
|
ssl = request.is_secure()
|
||||||
if delete:
|
if delete:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user