Skip to content

Commit

Permalink
fix: remove incorrect key type when filtering inaccessible blocks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Agrendalath committed Sep 7, 2024
1 parent 80e27f6 commit 3a169e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lms/djangoapps/course_home_api/outline/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down

0 comments on commit 3a169e6

Please sign in to comment.