Add check for empty offer

This commit is contained in:
Dave Gallant
2024-01-16 21:29:04 -05:00
parent 8195317e29
commit 112a807102
3 changed files with 10 additions and 6 deletions

View File

@@ -17,7 +17,8 @@ class Topic:
self.title = title
self.post_time = post_time
self.web_path = web_path
self.offer = Offer(**offer)
if offer:
self.offer = Offer(**offer)
def __repr__(self):
return f"Topic({self.title})"