-
Notifications
You must be signed in to change notification settings - Fork 435
fix: missing implementation groups on exports #1851
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
Conversation
""" WalkthroughA blank line was added after an early return in the Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Perhaps there is a misunderstanding. When no IG is selected, the "IG" functionality is not used, so we use all requirements, regardless of IG. We don't need to list IGs in this situation, because we don't care for them. |
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.
0k
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
backend/core/templates/core/audit_report.html (2)
42-51
: Avoid redundant method invocations in templateThe block calls
compliance_assessment.get_selected_implementation_groups
twice—first in the{% if %}
and then again in the{% for %}
—which may trigger duplicate queries or extra computation. Use a{% with %}
to store the result and reuse it:-{% if compliance_assessment.get_selected_implementation_groups %} - <div> - <p class='font-semibold'>{% trans "Selected implementation groups" %}</p> - <ul> - {% for group in compliance_assessment.get_selected_implementation_groups %} - <li>{{ group }}</li> - {% endfor %} - </ul> - </div> -{% endif %} +{% with selected_groups=compliance_assessment.get_selected_implementation_groups %} + {% if selected_groups %} + <div> + <p class='font-semibold'>{% trans "Selected implementation groups" %}</p> + <ul> + {% for group in selected_groups %} + <li>{{ group }}</li> + {% endfor %} + </ul> + </div> + {% endif %} +{% endwith %}🧰 Tools
🪛 HTMLHint (1.5.0)
[error] 44-44: The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
44-44
: Use double quotes for HTML attributesPer HTML standards (and to satisfy
HTMLHint
), attribute values should be wrapped in double quotes. Update theclass
attribute:-<p class='font-semibold'>{% trans "Selected implementation groups" %}</p> +<p class="font-semibold">{% trans "Selected implementation groups" %}</p>🧰 Tools
🪛 HTMLHint (1.5.0)
[error] 44-44: The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
backend/core/models.py
(1 hunks)backend/core/templates/core/audit_report.html
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- backend/core/models.py
🧰 Additional context used
🪛 HTMLHint (1.5.0)
backend/core/templates/core/audit_report.html
[error] 44-44: The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
backend/core/templates/core/audit_report.html (1)
45-45
: Use double quotes for HTML attributes
HTMLHint flagged the single quotes on theclass
attribute. Change to double quotes to satisfy lint rules.Apply this diff:
- <p class='font-semibold'>{% trans "Selected implementation groups" %}</p> + <p class="font-semibold">{% trans "Selected implementation groups" %}</p>🧰 Tools
🪛 HTMLHint (1.5.0)
[error] 45-45: The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
backend/core/templates/core/audit_report.html
(1 hunks)
🧰 Additional context used
🪛 HTMLHint (1.5.0)
backend/core/templates/core/audit_report.html
[error] 45-45: The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: enterprise-startup-docker-compose-test
- GitHub Check: startup-docker-compose-test
- GitHub Check: enterprise-startup-functional-test (3.12)
- GitHub Check: startup-functional-test (3.12)
- GitHub Check: functional-tests (3.12, chromium)
- GitHub Check: build (3.12)
- GitHub Check: test (3.12)
- GitHub Check: enterprise-functional-tests (3.12, chromium)
- GitHub Check: Analyze (python)
🔇 Additional comments (1)
backend/core/templates/core/audit_report.html (1)
42-53
: Conditional rendering of implementation groups is correct
Wrapping the "Selected implementation groups" block in a{% with %}
and checking forselected_groups
prevents empty sections from appearing when no groups are returned.🧰 Tools
🪛 HTMLHint (1.5.0)
[error] 45-45: The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
Summary by CodeRabbit