Reputation: 21
I have a token which has hyphen in it and I am trying to read it in jinja, Here is the sample code:
{
[
{
{% for curPool in data.pool %}
"name": "{{curPool.name}}",
"my-org":"{{curPool.my-org}}"
{% endfor %}
}
]
}
The variable curPool has two fields: name and my-org ( i have no choice of defining these tokens)
When I run this code, I get an error:
Can't render, error: 'unsupported operand type(s) for -: 'Undefined' and 'Undefined''
It seems to me that it does not know how to parse the hyphen in the token name. I have tried to escape it with '\', ''', and a '%'. But nothing works. Would appreciate your help
Thanks
Upvotes: 2
Views: 3729