diff --git a/flatisfy/email.py b/flatisfy/email.py index f1c60e8..36cb4b2 100644 --- a/flatisfy/email.py +++ b/flatisfy/email.py @@ -8,7 +8,7 @@ from builtins import str import logging import smtplib - +from money import Money from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import formatdate, make_msgid @@ -97,36 +97,28 @@ def send_notification(config, flats): for flat in flats: title = str(flat.title) flat_id = str(flat.id) - area = str(flat.area) - cost = str(flat.cost) + area = str(int(flat.area)) + cost = int(flat.cost) currency = str(flat.currency) - txt += "- {}: {}#/flat/{} ({}: {}, {}: {} {})\n".format( - title, - website_url, - flat_id, - trs["area"], - area, - trs["cost"], - cost, - currency, - ) - - html += """ + txt += f"- {title}: {website_url}#/flat/{flat_id}" + html += f"""