Skip to content
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

Conversation

NiedielnitsevIvan
Copy link

feat: AXIMST-676 Extend Sidenav endpoint with additional parameters

@NiedielnitsevIvan NiedielnitsevIvan force-pushed the Ivan_Niedielnitsev/AXIMST-676/feature/Extend-Sidenav-endpoint-with-additional-parameters branch from 2d65121 to 0af632a Compare March 20, 2024 08:41
@NiedielnitsevIvan NiedielnitsevIvan self-assigned this Mar 20, 2024
@NiedielnitsevIvan NiedielnitsevIvan marked this pull request as draft March 21, 2024 07:42
@NiedielnitsevIvan NiedielnitsevIvan marked this pull request as ready for review March 21, 2024 07:53
@@ -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:
Copy link
Collaborator

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?

Copy link
Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for clarification!

@monteri
Copy link
Collaborator

monteri commented Mar 21, 2024

Stylelint issue are required to be fixed

@monteri monteri merged commit 80a5697 into ts-develop Mar 21, 2024
43 checks passed
monteri pushed a commit that referenced this pull request Mar 27, 2024
…#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
ruzniaievdm pushed a commit that referenced this pull request Mar 28, 2024
…#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
ruzniaievdm pushed a commit that referenced this pull request Apr 4, 2024
…#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
monteri pushed a commit that referenced this pull request Apr 10, 2024
…#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
GlugovGrGlib pushed a commit that referenced this pull request Apr 12, 2024
…#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
monteri pushed a commit that referenced this pull request Apr 17, 2024
…#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants