Consider current trips for free weekends list

Closes: #138
This commit is contained in:
Edward Betts 2024-03-05 12:28:34 +01:00
parent a37af733cd
commit ff15f380fa

View file

@ -313,7 +313,9 @@ def get_busy_events(
busy_events = [
e
for e in sorted(events, key=lambda e: e.as_date)
if e.as_date > today and e.as_date < next_year and busy_event(e)
if (e.as_date >= today or (e.end_date and e.end_as_date >= today))
and e.as_date < next_year
and busy_event(e)
]
return busy_events