From 2e3cb95b4c4026d5261de4258e086ad1e0d258a3 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Wed, 11 Sep 2024 22:48:35 +0200 Subject: [PATCH] feat: allow field without value in criteria --- templates/mako.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/mako.j2 b/templates/mako.j2 index 43059ba..7eaf517 100644 --- a/templates/mako.j2 +++ b/templates/mako.j2 @@ -9,7 +9,8 @@ {% for rule in mako_rules %} [ {%- for criteria in rule['criterias'] %} -{{ criteria.field ~ '="' ~ criteria.value ~ '"' }} +{{ criteria.field }} +{%- if criteria.value is defined %}{{ '="' ~ criteria.value ~ '"' }}{% endif %} {%- if not loop.last %}{{ ' ' }}{% endif %} {%- endfor %}] {% for option, value in rule['options'].items() %}