chore: add logging to fa form (#34224)

* chore: add logging to fa form

* chore: formatting
This commit is contained in:
Chris Pappas
2024-02-12 18:28:41 -05:00
committed by GitHub
parent 2e15d69c33
commit 4a2e7c72b4

View File

@@ -2013,6 +2013,10 @@ def financial_assistance_request(request):
username = data['username']
if request.user.username != username:
return HttpResponseForbidden()
# Require email verification
if request.user.is_active is not True:
logging.warning('FA_v1: User %s tried to submit app without activating their account.', username)
return HttpResponseForbidden('Please confirm your email before applying for financial assistance.')
course_id = data['course']
course = modulestore().get_course(CourseKey.from_string(course_id))
@@ -2087,6 +2091,7 @@ def financial_assistance_request_v2(request):
return HttpResponseForbidden()
# Require email verification
if request.user.is_active is not True:
logging.warning('FA_v2: User %s tried to submit app without activating their account.', username)
return HttpResponseForbidden('Please confirm your email before applying for financial assistance.')
course_id = data['course']