From 65774f402f6c1d997a7de8e21b5c1f7ecc250dd1 Mon Sep 17 00:00:00 2001 From: Adam Shimali Date: Thu, 21 Nov 2024 11:09:06 +0000 Subject: [PATCH] fixed display of plan adopted date --- application/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/models.py b/application/models.py index fbe40d6..2e32d4c 100644 --- a/application/models.py +++ b/application/models.py @@ -749,10 +749,13 @@ def timeline(self): events.extend(event.as_timeline_entry()) if self.local_plan_obj.adopted_date: + adopted_date_text = self.local_plan_obj.adopted_date + if adopted_date_text.replace("-", "") == "": + adopted_date_text = "Date unavailable" events.append( { "name": "Plan adopted", - "date": self.local_plan_obj.adopted_date, + "date": adopted_date_text, } ) # reverse the events so the most recent ones are at the top