Open
Description
Describe the bug
[2023-10-13T04:48:02Z ERROR service::notification::enqueue] Failed to render notification body template: Error { kind: Msg("Failed to render 'body_template'"), source: Some(Error { kind: Msg("Variable `num_of_stores_created_stock_take_within60days.0.num_of_stores_created_stock_take_within60days` not found in context while rendering 'body_template'"), source: None }) }
To Reproduce
Create a query that returns no rows.
Try to use that query result in your template
Expected behaviour
Not sure! Maybe should fail, but also might fail unexpectedly at a time when you expect it wouldn't.
Make should still render what it can??
Looks like we could use tera defaults (if we know what we're doing in a template)
https://keats.github.io/tera/docs/#default
{{ value | default(value=1) }}
Additional context
Maybe the best idea to allow optional default values in the template params?