-
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-676] Extend Sidenav endpoint with additional parameters #2516
feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters #2516
Conversation
2d65121
to
0af632a
Compare
@@ -43,6 +43,9 @@ def get_blocks(self, block): # pylint: disable=missing-function-docstring | |||
description = block['special_exam_info'].get('short_description') | |||
icon = block['special_exam_info'].get('suggested_icon', 'fa-pencil-square-o') | |||
|
|||
if self.context.get('enable_prerequisite_block_type', False) and block.get('accessible') is False: |
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.
[question] is the a reason why we use is False
instead of == False
?
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.
In Python, False is a singleton object, meaning there is only one instance of it. Therefore, using is to check if a variable is False is both clearer and more efficient than using ==.
Here's the link to the Python documentation that supports this:
Python Documentation: The Python Language Reference - Boolean Operations
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.
Thank you for clarification!
Stylelint issue are required to be fixed |
…#2516) * feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters * test: [AXIMST-676] fix tests * refactor: [AXIMST-676] change block type to 'lock' if it has a prerequisite * style: [AXIMST-676] remove extra comma
…#2516) * feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters * test: [AXIMST-676] fix tests * refactor: [AXIMST-676] change block type to 'lock' if it has a prerequisite * style: [AXIMST-676] remove extra comma
…#2516) * feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters * test: [AXIMST-676] fix tests * refactor: [AXIMST-676] change block type to 'lock' if it has a prerequisite * style: [AXIMST-676] remove extra comma
…#2516) * feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters * test: [AXIMST-676] fix tests * refactor: [AXIMST-676] change block type to 'lock' if it has a prerequisite * style: [AXIMST-676] remove extra comma
…#2516) * feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters * test: [AXIMST-676] fix tests * refactor: [AXIMST-676] change block type to 'lock' if it has a prerequisite * style: [AXIMST-676] remove extra comma
…#2516) * feat: [AXIMST-676] Extend Sidenav endpoint with additional parameters * test: [AXIMST-676] fix tests * refactor: [AXIMST-676] change block type to 'lock' if it has a prerequisite * style: [AXIMST-676] remove extra comma
feat: AXIMST-676 Extend Sidenav endpoint with additional parameters