From 04804c49eefd80efb0f31b27b56192ee4c77081b Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Thu, 29 Feb 2024 10:14:22 +0100 Subject: Avoid empty newlines in jina templates when if conditions evaluate to false - avoid empty newlines for false if statements - this is useful for the logging of the rendered objects in tests Issue-ID: TEST-417 Change-Id: Iaeec217c87e73e316c4ef468007369facbf9a02f Signed-off-by: Fiete Ostkamp --- src/onapsdk/sdc/templates/sdc_resource_category.json.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/onapsdk/sdc/templates/sdc_resource_category.json.j2') diff --git a/src/onapsdk/sdc/templates/sdc_resource_category.json.j2 b/src/onapsdk/sdc/templates/sdc_resource_category.json.j2 index 633aacd..c346b89 100644 --- a/src/onapsdk/sdc/templates/sdc_resource_category.json.j2 +++ b/src/onapsdk/sdc/templates/sdc_resource_category.json.j2 @@ -3,11 +3,11 @@ "normalizedName": "{{ category.normalized_name }}", "name": "{{ category.name }}", "uniqueId": "{{ category.unique_id }}", - "subcategories": {% if category.subcategories %}{{ category.subcategories|tojson }}{% else %}null{% endif %}, - "version": {% if category.version %}"{{ category.version }}"{% else %}null{% endif %}, - "ownerId": {% if category.owner_id %}"{{ category.owner_id }}"{% else %}null{% endif %}, + "subcategories": {%- if category.subcategories %}{{ category.subcategories|tojson }}{% else %}null{%- endif %}, + "version": {%- if category.version %}"{{ category.version }}"{% else %}null{%- endif %}, + "ownerId": {%- if category.owner_id %}"{{ category.owner_id }}"{% else %}null{%- endif %}, "empty": {{ category.empty|tojson }}, - "type": {% if category.type %}"{{ category.type }}"{% else %}null{% endif %}, + "type": {%- if category.type %}"{{ category.type }}"{% else %}null{%- endif %}, "icons": {% if category.icons %}{{ category.icons|tojson }}{% else %}null{% endif %} } ] \ No newline at end of file -- cgit 1.2.3-korg