This commit is contained in:
Lucas Verney 2021-05-16 15:02:20 +02:00
parent c463b468e8
commit 2358bc42c5
1 changed files with 8 additions and 2 deletions

View File

@ -97,8 +97,14 @@ def send_notification(config, flats):
for flat in flats: for flat in flats:
title = str(flat.title) title = str(flat.title)
flat_id = str(flat.id) flat_id = str(flat.id)
area = str(int(flat.area)) try:
cost = int(flat.cost) area = str(int(flat.area))
except (TypeError, ValueError):
area = None
try:
cost = int(flat.cost)
except (TypeError, ValueError):
cost = None
currency = str(flat.currency) currency = str(flat.currency)
txt += f"- {title}: {website_url}#/flat/{flat_id} " txt += f"- {title}: {website_url}#/flat/{flat_id} "