Skip to content

Commit

Permalink
fixed but with None type
Browse files Browse the repository at this point in the history
  • Loading branch information
jsayles committed Mar 24, 2020
1 parent 842134b commit d69c85c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arpwatch/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def logins_by_day(request, year, month, day):
def tracker(request, username):
user = get_object_or_404(User, username=username)
ip = network.get_addr(request)
prefix = settings.ARP_IP_PFX
if ip and ip.startwith(settings.ARP_IP_PFX):
prefix = getattr(settings, 'ARP_IP_PFX', '')
if ip and ip.startwith(prefix):
arp.register_user_ip(user, ip)
print("register_user_ip: Address for %s = %s @ %s" % (user, ip, logtime))
return HttpResponse()
Expand Down

0 comments on commit d69c85c

Please sign in to comment.