From 2a57a40782c7e76199f884bd46aaa9a95a06ada0 Mon Sep 17 00:00:00 2001 From: James Keasley Date: Tue, 10 Sep 2024 12:00:23 +0100 Subject: [PATCH] Use the correct property in the test for the logic to function This commit modifies the logic to use the correct property of the object to allow the test to function as expected To Test: - locally have a guidance listing page and an ig_guidance page of the type Panel Guidance and an ig_guidance page of another type (eg external) - load the guidance listing page - confirm that there is no label 'Panel Guidance' in the panel guidance page's card - confirm that the expected label is displayed on the card for the page that has a different type --- app/templates/ig_guidance/_partials/guidance.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/templates/ig_guidance/_partials/guidance.html b/app/templates/ig_guidance/_partials/guidance.html index ccde2c06..69f2a39e 100644 --- a/app/templates/ig_guidance/_partials/guidance.html +++ b/app/templates/ig_guidance/_partials/guidance.html @@ -13,8 +13,7 @@
- - {% if guidance.guidance_type != "Panel Guidance" %} + {% if guidance.content_type.name != "Panel Guidance" %} {{ guidance|guidance_type }} {% endif %}