-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [AXIMST-584] create view for course navigation sidebar #2511
feat: [AXIMST-584] create view for course navigation sidebar #2511
Conversation
@@ -19,7 +19,8 @@ class CourseBlockSerializer(serializers.Serializer): | |||
def get_blocks(self, block): # pylint: disable=missing-function-docstring | |||
block_key = block['id'] | |||
block_type = block['type'] | |||
children = block.get('children', []) if block_type != 'sequential' else [] # Don't descend past sequential | |||
last_parent_block_type = 'vertical' if self.context.get('include_vertical') else 'sequential' | |||
children = block.get('children', []) if block_type != last_parent_block_type else [] # Don't descend past sequential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment seems not to be valid anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, removed
@NiedielnitsevIvan Do you think we can already create unit tests for the view, or it can be problematic because of the optimization changes in the follow up tasks? Additionally, please fix the pylint check |
@GlugovGrGlib |
ad97067
to
0ccb71e
Compare
* feat: [AXIMST-584] create view for course navigation sidebar * test: [AXIMST-584] add tests for CourseSidebarBlocksView
* feat: [AXIMST-584] create view for course navigation sidebar * test: [AXIMST-584] add tests for CourseSidebarBlocksView
* feat: [AXIMST-584] create view for course navigation sidebar * test: [AXIMST-584] add tests for CourseSidebarBlocksView
* feat: [AXIMST-584] create view for course navigation sidebar * test: [AXIMST-584] add tests for CourseSidebarBlocksView
* feat: [AXIMST-584] create view for course navigation sidebar * test: [AXIMST-584] add tests for CourseSidebarBlocksView
* feat: [AXIMST-584] create view for course navigation sidebar * test: [AXIMST-584] add tests for CourseSidebarBlocksView
AXIMST-584 [BE] Create endpoint providing Course structure for sidebar