From b023c0341159a674308a87f94fc4b3f2b82d5b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Wed, 9 Aug 2023 10:51:25 -1000 Subject: [PATCH] Fix emission of empty ACTIONS tag The latest version of the patterndb schema fail validation if an ACTIONS tag has no ACTION tag in it. Ensure we do not produce such a tag when it is not needed. Fixes #3 --- templates/rule-footer.erb | 2 ++ templates/rule-header.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/templates/rule-footer.erb b/templates/rule-footer.erb index 79c6c83..3576340 100644 --- a/templates/rule-footer.erb +++ b/templates/rule-footer.erb @@ -1,2 +1,4 @@ +<% if ! @actions.empty? -%> +<% end -%> diff --git a/templates/rule-header.erb b/templates/rule-header.erb index 80642d3..e52505f 100644 --- a/templates/rule-header.erb +++ b/templates/rule-header.erb @@ -44,4 +44,6 @@ <% end -%> <% end -%> +<% if ! @actions.empty? -%> +<% end -%>