Skip to content

Commit

Permalink
utils: only eval strings
Browse files Browse the repository at this point in the history
  • Loading branch information
yashlamba committed Aug 2, 2024
1 parent e717da2 commit 5ed3e62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions invenio_jobs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

def eval_tpl_str(val, ctx):
"""Evaluate a Jinja template string."""
if not isinstance(val, str):
return val

tpl = jinja_env.from_string(val)
res = tpl.render(**ctx)

Expand Down

0 comments on commit 5ed3e62

Please sign in to comment.