From 5161ea87ba7b820b3189aeecf08666298d897ceb Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Mon, 12 Aug 2024 10:30:13 -0400 Subject: [PATCH] Fix site observation admin 500 error The presence of any null-valued timestamps broke the rendering of the site observation admin page. --- rdwatch/core/models/site_observation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdwatch/core/models/site_observation.py b/rdwatch/core/models/site_observation.py index 660a61060..30289acbf 100644 --- a/rdwatch/core/models/site_observation.py +++ b/rdwatch/core/models/site_observation.py @@ -63,7 +63,7 @@ class SiteObservation(models.Model): def __str__(self): sit = str(self.siteeval) lbl = str(self.label).upper() - tim = self.timestamp.isoformat() + tim = self.timestamp.isoformat() if self.timestamp else 'unknown' return f'{sit}[{lbl}@{tim}]' @classmethod