diff --git a/common/djangoapps/student/views/dashboard.py b/common/djangoapps/student/views/dashboard.py index d38a3c3c3407..69d0814ac0e4 100644 --- a/common/djangoapps/student/views/dashboard.py +++ b/common/djangoapps/student/views/dashboard.py @@ -790,6 +790,15 @@ def student_dashboard(request): # pylint: disable=too-many-statements context = { 'urls': urls, 'programs_data': programs_data, + # These enterprise-related keys are populated by DashboardContextEnricher (via DashboardRenderStarted filter) + # when the enterprise package is installed. Safe defaults are provided here so that: + # 1. The template renders safely on non-enterprise deployments. + # 2. Any stale compiled Mako cache that still references consent_required_courses (from before + # PR #38094 removed that line) will not crash with "argument of type 'Undefined' is not iterable". + 'enterprise_message': '', + 'consent_required_courses': set(), + 'enterprise_learner_portal_enabled_message': None, + 'banner_account_activation_message': None, 'enrollment_message': enrollment_message, 'redirect_message': Text(redirect_message), 'account_activation_messages': account_activation_messages, diff --git a/lms/envs/common.py b/lms/envs/common.py index 3b7133836d9c..2b6bbdaf551a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3292,7 +3292,7 @@ def _should_send_certificate_events(settings): "pipeline": ["enterprise.filters.accounts.AccountSettingsReadOnlyFieldsStep"], }, "org.openedx.learning.dashboard.render.started.v1": { - "fail_silently": False, + "fail_silently": True, "pipeline": ["enterprise.filters.dashboard.DashboardContextEnricher"], }, }