diff --git a/lms/djangoapps/student_account/test/test_views.py b/lms/djangoapps/student_account/test/test_views.py index ea032ac002..0594a827ec 100644 --- a/lms/djangoapps/student_account/test/test_views.py +++ b/lms/djangoapps/student_account/test/test_views.py @@ -764,7 +764,7 @@ class StudentAccountLoginAndRegistrationTest(ThirdPartyAuthTestMixin, UrlResetMi "errorMessage": None, "registerFormSubmitButtonText": "Create Account", "syncLearnerProfileData": False, - "pipeline_user_details": {"email": "test@test.com"} if add_user_details else None + "pipeline_user_details": {"email": "test@test.com"} if add_user_details else {} } if expected_ec is not None: # If we set an EnterpriseCustomer, third-party auth providers ought to be hidden. diff --git a/lms/djangoapps/student_account/views.py b/lms/djangoapps/student_account/views.py index 249f8a3694..94fa06e88a 100644 --- a/lms/djangoapps/student_account/views.py +++ b/lms/djangoapps/student_account/views.py @@ -269,7 +269,7 @@ def _third_party_auth_context(request, redirect_to, tpa_hint=None): "errorMessage": None, "registerFormSubmitButtonText": _("Create Account"), "syncLearnerProfileData": False, - "pipeline_user_details": None + "pipeline_user_details": {} } if third_party_auth.is_enabled(): diff --git a/lms/templates/student_account/login.underscore b/lms/templates/student_account/login.underscore index 7b7252da94..d7b66864e0 100644 --- a/lms/templates/student_account/login.underscore +++ b/lms/templates/student_account/login.underscore @@ -9,7 +9,7 @@ <% } %> <% if (context.enterpriseName) { %> - <% if (context.pipelineUserDetails.email) { %> + <% if (context.pipelineUserDetails && context.pipelineUserDetails.email) { %>

<%- gettext("Sign in to continue learning as {email}").replace("{email}", context.pipelineUserDetails.email) %>

<% } else { %>

<%- gettext("Sign in to continue learning") %>