diff --git a/lms/djangoapps/learner_dashboard/programs.py b/lms/djangoapps/learner_dashboard/programs.py index f7e0914a88f3..53b653d85508 100644 --- a/lms/djangoapps/learner_dashboard/programs.py +++ b/lms/djangoapps/learner_dashboard/programs.py @@ -90,8 +90,7 @@ def render_to_fragment(self, request, program_uuid, **kwargs): meter = ProgramProgressMeter(request.site, request.user, uuid=program_uuid) program_data = meter.programs[0] - - if not program_data: + if not program_data or program_data.get('status', '') == 'unpublished': raise Http404 try: diff --git a/openedx/core/djangoapps/catalog/management/commands/cache_programs.py b/openedx/core/djangoapps/catalog/management/commands/cache_programs.py index b8c78b371f81..d903f50a37a0 100644 --- a/openedx/core/djangoapps/catalog/management/commands/cache_programs.py +++ b/openedx/core/djangoapps/catalog/management/commands/cache_programs.py @@ -135,7 +135,7 @@ def get_site_program_uuids(self, client, site): try: querystring = { 'exclude_utm': 1, - 'status': ('active', 'retired'), + 'status': ('active', 'retired', 'unpublished'), 'uuids_only': 1, }