error when template contains Iteration of list
Error existe in lastest version moto 4.0.8
Having this template :
{{#each items}} <a href="{{itemName}}">{{itemDesc}}</a> {{/each}}
And our input :
{"items": [{"itemName": "item1", "itemDesc": "description 1"}]}
Moto will not find out "items" from input because moto search for "#each items".
def are_all_variables_present(template, template_data):
https://github.com/spulec/moto/blob/80ab997010f9f8a2c26272671e6216ad12fac5c3/moto/ses/models.py#L115
In addition, moto can not find itemName and itemDesc from a lower level dict inside a list.
Thanks for raising this @uwevil - marking it as an enhancement to improve the template parsing.
Do you want to raise a PR for this yourself?
Hi, I would like to work on this issue
Sounds good @mahi072! I haven't looked really into this issue yet, so I don't know the best way to implement this, but let me know if you need any help or pointers.