chore: add logging to fa form (#34224)
* chore: add logging to fa form * chore: formatting
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user