From 7ecb42379ad87eb985337e1f8c4131b2d3d9e663 Mon Sep 17 00:00:00 2001 From: Mira <86979912+mira-miracoli@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:06:17 +0100 Subject: [PATCH] fix empty dicts --- templates/galaxy.yml.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/galaxy.yml.j2 b/templates/galaxy.yml.j2 index 208c527..d7bc7b7 100644 --- a/templates/galaxy.yml.j2 +++ b/templates/galaxy.yml.j2 @@ -25,4 +25,7 @@ {% for section, val in galaxy_config | dictsort if section not in ('uwsgi', 'gravity', galaxy_app_config_section) %} {{ {section: val} | to_nice_yaml(indent=4) }} {% endfor %} +{% for key, value in galaxy_config_merged[galaxy_app_config_section] | dictsort %} +{% set _dummy=galaxy_config_merged[galaxy_app_config_section].pop(key) if value is mapping and value|length == 0 %} +{% endfor %} {{ {galaxy_app_config_section: galaxy_config_merged[galaxy_app_config_section]} | to_nice_yaml(indent=4) }}