Improve display of holidays

This commit is contained in:
Edward Betts 2023-12-15 12:03:58 +00:00
parent 796edef75c
commit aa612b94f0

View file

@ -168,8 +168,11 @@ def combine_holidays(holidays: list[Holiday]) -> list[Event]:
sorted(country.upper() for country in all_countries - set(countries))
)
title = f"{name} ({country_list})"
e = Event(name="holiday", date=d, title=title)
e = Event(
name="holiday",
date=d,
title=f"{name} ({country_list})" if country_list else name,
)
events.append(e)
return events