From 141fd6734d9e8e5e74d6f13ec4a79d6ebf409c96 Mon Sep 17 00:00:00 2001 From: Derek Eder Date: Fri, 2 Feb 2024 17:14:01 -0600 Subject: [PATCH] handling missing topics from extras --- chicago/models.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chicago/models.py b/chicago/models.py index 24eaa59..1a161bf 100644 --- a/chicago/models.py +++ b/chicago/models.py @@ -75,9 +75,12 @@ def inferred_status(self): @property def topics(self): - return ["Routine" if self.extras["routine"] else "Non-Routine"] + self.extras[ - "topics" - ] + if "topics" in self.extras: + return [ + "Routine" if self.extras["routine"] else "Non-Routine" + ] + self.extras["topics"] + + return [] @property def addresses(self):