You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because Jinja2 essentially revolves around html templates, variables are returned as strings. This code fails to find the correct index path because read_len is set to the string '100' instead of preserving the integer:
{% set read_len = sample.read_length|default(100) %}
{% set star_index = constants.phoenix.star_indices[read_len] %}
Ansible users also ran into this problem, and created a new environment that preserves the types: pallets/jinja#708
Not changing this for now because it forces you to also cast variables to strings when rendering in templates if they are not already strings. I've been working fine without it so far.
http://jinja.pocoo.org/docs/2.10/nativetypes/
Because Jinja2 essentially revolves around html templates, variables are returned as strings. This code fails to find the correct index path because
read_len
is set to the string'100'
instead of preserving the integer:Ansible users also ran into this problem, and created a new environment that preserves the types: pallets/jinja#708
Here are the docs:
http://jinja.pocoo.org/docs/2.10/nativetypes/
Need to try changing, then validate that it doesn't mess up anything else.
The text was updated successfully, but these errors were encountered: