From 40510c24cd21efd73d613670c907434440bdd017 Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Sat, 7 Sep 2024 14:54:03 +0200 Subject: [PATCH] fix: remove incorrect key type when filtering inaccessible blocks Returning the list with a 'completion' string was added in 9bc0f85. However, the `get_accessible_sequences` method expects a list of dicts with an 'id' key. --- lms/djangoapps/course_home_api/outline/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/course_home_api/outline/views.py b/lms/djangoapps/course_home_api/outline/views.py index e7ebb2eef28f..f4fa60df5c6c 100644 --- a/lms/djangoapps/course_home_api/outline/views.py +++ b/lms/djangoapps/course_home_api/outline/views.py @@ -501,7 +501,7 @@ def filter_inaccessible_blocks(self, course_blocks, course_key): for section_data in course_sections: section_data['children'] = self.get_accessible_sequences( user_course_outline, - section_data.get('children', ['completion']) + section_data.get('children', []) ) accessible_sequence_ids = {str(usage_key) for usage_key in user_course_outline.accessible_sequences} for sequence_data in section_data['children']: