1
0
Fork 0

Workaround invalid currencies

Dieser Commit ist enthalten in:
Lucas Verney 2021-04-30 21:52:13 +02:00
Ursprung 3b9cf0917a
Commit fd33e5cb3f
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -111,8 +111,12 @@ def send_notification(config, flats):
if area:
fields.append(f"{trs['area']}: {area}")
if cost:
if currency == '$':
currency = 'USD'
if currency == '':
currency = 'EUR'
money = Money(cost, currency).format(config["notification_lang"])
fields.append(f"{trs['cost']}: {money}")
fields.append(f"{trs['cost']}: {money.format()}")
if len(fields):
txt += f'({", ".join(fields)})'