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

@@ -29,7 +29,7 @@ from edx_ace import ace
from edx_ace.recipient import Recipient
from edx_django_utils import monitoring as monitoring_utils
from eventtracking import tracker
from ipware.ip import get_ip
from ipware.ip import get_client_ip
# Note that this lives in LMS, so this dependency should be refactored.
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
@@ -340,7 +340,7 @@ def change_enrollment(request, check_access=True):
# or if the user is enrolling in a country in which the course
# is not available.
redirect_url = embargo_api.redirect_if_blocked(
course_id, user=user, ip_address=get_ip(request),
course_id, user=user, ip_address=get_client_ip(request)[0],
url=request.path
)
if redirect_url: