gwr_advance_tickets can be None
This commit is contained in:
parent
f5425a0564
commit
ce9ca7914d
|
@ -232,7 +232,6 @@ async def get_data(now: datetime) -> typing.Mapping[str, str | object]:
|
||||||
my_data = config["data"]["personal-data"]
|
my_data = config["data"]["personal-data"]
|
||||||
events = (
|
events = (
|
||||||
[
|
[
|
||||||
Event(name="gwr_advance_tickets", date=gwr_advance_tickets),
|
|
||||||
Event(name="mothers_day", date=uk_holiday.get_mothers_day(today)),
|
Event(name="mothers_day", date=uk_holiday.get_mothers_day(today)),
|
||||||
]
|
]
|
||||||
+ timezone_transition(minus_365, plus_365, "uk_clock_change", "Europe/London")
|
+ timezone_transition(minus_365, plus_365, "uk_clock_change", "Europe/London")
|
||||||
|
@ -241,6 +240,9 @@ async def get_data(now: datetime) -> typing.Mapping[str, str | object]:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if gwr_advance_tickets:
|
||||||
|
events.append(Event(name="gwr_advance_tickets", date=gwr_advance_tickets))
|
||||||
|
|
||||||
events += combine_holidays(bank_holiday + get_us_holidays(last_year, next_year))
|
events += combine_holidays(bank_holiday + get_us_holidays(last_year, next_year))
|
||||||
events += birthday.get_birthdays(last_year, os.path.join(my_data, "entities.yaml"))
|
events += birthday.get_birthdays(last_year, os.path.join(my_data, "entities.yaml"))
|
||||||
events += accommodation.get_events(os.path.join(my_data, "accommodation.yaml"))
|
events += accommodation.get_events(os.path.join(my_data, "accommodation.yaml"))
|
||||||
|
|
Loading…
Reference in a new issue