Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #832
I was not able to set Flask's jinja environment to "StrictUndefined" in arbeitszeit_flask/init.py because of an unexpected behaviour in flask-restx that is probably a bug. More on this bug: python-restx/flask-restx#565
More on "StrictUndefined": https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.StrictUndefined
But by activating this stricter environment "StrictUndefined" temporarily, I found and fixed some problematic lines of code.
Commits:
Fix wrong variable in coop summary template
Check in jinja expressions if var is defined
In general it is more secure to check in jinja expressions if a variable is defined, not only if this variable is true. Two templates have been adapted accordingly.
Plan: fe6ed75b-5ad9-4821-a399-7ca8303e2fea