Set default value of pipeline_user_details to empty dict instead of None.

This commit is contained in:
Saleem Latif
2018-01-29 13:50:54 +05:00
parent 6a92b664d1
commit 534a5a7e97
3 changed files with 3 additions and 3 deletions

View File

@@ -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.

View File

@@ -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():

View File

@@ -9,7 +9,7 @@
<% } %>
<% if (context.enterpriseName) { %>
<% if (context.pipelineUserDetails.email) { %>
<% if (context.pipelineUserDetails && context.pipelineUserDetails.email) { %>
<h2><%- gettext("Sign in to continue learning as {email}").replace("{email}", context.pipelineUserDetails.email) %></h2>
<% } else { %>
<h2><%- gettext("Sign in to continue learning") %></h2>