This commit is contained in:
@@ -225,10 +225,11 @@ def update_gcal(scraped_events, tracks, cfg):
|
||||
track_gcal_id = gcal_map[track_name]
|
||||
for e in events:
|
||||
ical_uid = uid_prefix + e["id"]
|
||||
try: # sometimes events have weird start/end times that fail gcal's validation, but that shouldn't kill our vibe
|
||||
try:
|
||||
start = datetime.fromisoformat(e["start_calendar"])
|
||||
end = datetime.fromisoformat(e["end_calendar"])
|
||||
|
||||
# sometimes events have weird start/end times that fail gcal's validation, but don't let that kill our vibe
|
||||
if start >= end:
|
||||
action_taken_map["other"].append(e)
|
||||
raise Exception((f"Event {e['title']} (uid: {ical_uid}) has an invalid duration, {start} -> {end}"))
|
||||
|
||||
Reference in New Issue
Block a user