Upgrade django-ipware (#24827)

This commit is contained in:
M. Zulqarnain
2021-02-23 18:14:17 +05:00
committed by GitHub
parent 40ece9ea9b
commit 42fc6aef03
15 changed files with 29 additions and 49 deletions

View File

@@ -16,7 +16,7 @@ import six
from django.conf import settings
from django.utils.deprecation import MiddlewareMixin
from eventtracking import tracker
from ipware.ip import get_ip
from ipware.ip import get_client_ip
from common.djangoapps.track import contexts, views
@@ -229,7 +229,7 @@ class TrackMiddleware(MiddlewareMixin):
def get_request_ip_address(self, request):
"""Gets the IP address of the request"""
ip_address = get_ip(request)
ip_address = get_client_ip(request)[0]
if ip_address is not None:
return ip_address
else: