Workaround invalid currencies
This commit is contained in:
parent
3b9cf0917a
commit
fd33e5cb3f
@ -111,8 +111,12 @@ def send_notification(config, flats):
|
|||||||
if area:
|
if area:
|
||||||
fields.append(f"{trs['area']}: {area}m²")
|
fields.append(f"{trs['area']}: {area}m²")
|
||||||
if cost:
|
if cost:
|
||||||
|
if currency == '$':
|
||||||
|
currency = 'USD'
|
||||||
|
if currency == '€':
|
||||||
|
currency = 'EUR'
|
||||||
money = Money(cost, currency).format(config["notification_lang"])
|
money = Money(cost, currency).format(config["notification_lang"])
|
||||||
fields.append(f"{trs['cost']}: {money}")
|
fields.append(f"{trs['cost']}: {money.format()}")
|
||||||
|
|
||||||
if len(fields):
|
if len(fields):
|
||||||
txt += f'({", ".join(fields)})'
|
txt += f'({", ".join(fields)})'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user