From 39b7da89768784cfc85dc2651058dbf3fd678c33 Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Fri, 26 Oct 2018 12:19:53 +0200
Subject: [PATCH] Fix for related pages with no deadline always show as Closed.

---
 opentech/templates/includes/relatedcontent_card.html | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/opentech/templates/includes/relatedcontent_card.html b/opentech/templates/includes/relatedcontent_card.html
index b60ecb447..a4cce86ef 100644
--- a/opentech/templates/includes/relatedcontent_card.html
+++ b/opentech/templates/includes/relatedcontent_card.html
@@ -3,11 +3,10 @@
 {% with page=page.specific %}
 <a class="card" href="{% pageurl page %}">
     <h6 class="card__subheading">
-        {% if page.deadline %}
+        {% if page.is_open %}
             <svg class="icon icon--calendar apply-bar__icon"><use xlink:href="#calendar"></use></svg>
-            Next deadline:
-            <span>{{ page.deadline|date:"M j, Y" }}</span>
-        {% else %}
+            Next deadline: <span>{{ page.deadline|date:"M j, Y" }}</span>
+        {% elif page.can_open %}
             Closed
         {% endif %}
     </h6>
-- 
GitLab