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

RDISCROWD-7660 move authorized services section #478

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

peterkle
Copy link

Issue number of the reported bug or feature request: #RDISCROWD-7660

@peterkle peterkle requested a review from kbecker42 November 19, 2024 19:08

{% for (form_name, display, form) in forms %}
<h3>{{display}}</h3>
{{render_form(form, form_id=form_name, action_url=url_for('project.ext_config', short_name=project.short_name), action_text='Submit', class_='', btn_name=form_name, btn_class='btn btn-default', btn_value=None)}}
{% endfor %}

<h3>Authorized Services</h3>
{% if authorized_services is defined and authorized_services|length > 0 %}

Choose a reason for hiding this comment

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

Can this be optimized to:

{% if authorized_services %}

Copy link
Author

Choose a reason for hiding this comment

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

From what I know about Jinja templating language, no: https://www.shellhacks.com/jinja2-check-if-variable-empty-exists-defined-true/

Choose a reason for hiding this comment

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

Feel free to test the optimized version. Otherwise, either would be fine. Thank you.

@peterkle peterkle merged commit 78759b6 into main Nov 19, 2024
4 checks passed
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