Fix status base.html 73/135373/1
authorMichal Jagiello <michal.jagiello@t-mobile.pl>
Wed, 12 Jul 2023 09:57:41 +0000 (09:57 +0000)
committerMichal Jagiello <michal.jagiello@t-mobile.pl>
Wed, 12 Jul 2023 09:57:41 +0000 (09:57 +0000)
Fix error with template generation for k8s status tests on some conditions

Issue-ID: INT-2246
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I18d9c4b81ea32d95a8d9a16fdaf1c0a17b0689f4

src/onaptests/templates/status/base.html.j2

index d46782d..1a49e05 100644 (file)
@@ -97,11 +97,7 @@ is-danger
       {% if k8s.spec.selector.match_labels %}
       {{ key_value_description_list('Selector', k8s.spec.selector.match_labels) | indent(width=6) }}
       {% else %}
-      {% if k8s.spec.selector.items %}
-      {{ key_value_description_list('Selector', k8s.spec.selector) | indent(width=6) }}
-      {% else %}
-      {{ key_value_description_list('Selector', dict()) | indent(width=6) }}
-      {% endif %}
+      {{ key_value_description_list('Selector', k8s.spec.selector.to_dict()) | indent(width=6) }}
       {% endif %}
       {% endif %}
       {% if k8s.phase %}