Ignore some events in terms of gap finding

This commit is contained in:
Edward Betts 2023-12-31 20:57:54 +00:00
parent 2ac5c905dd
commit 233d4e7fb7

View file

@ -335,6 +335,9 @@ def busy_event(e: Event) -> bool:
}:
return False
if e.title in ("IA UK board meeting", "Mill Road Winter Fair"):
return False
if e.name == "conference" and not e.going:
return False
if not e.title:
@ -475,7 +478,9 @@ async def get_data(
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
and e.as_date < (today + timedelta(days=365 * 2))
and busy_event(e)
]
gaps = find_gaps(busy_events)