Skip to content

Commit

Permalink
handling missing topics from extras
Browse files Browse the repository at this point in the history
  • Loading branch information
derekeder committed Feb 2, 2024
1 parent 88147dc commit 141fd67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions chicago/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 141fd67

Please sign in to comment.