From 9cebb8280ee27115b48cb8f339a662b939bc109b Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Sun, 8 Aug 2021 18:14:56 +0200 Subject: [PATCH] Special online links --- data/schedule.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/schedule.py b/data/schedule.py index c298b27..1ff0a38 100644 --- a/data/schedule.py +++ b/data/schedule.py @@ -113,7 +113,13 @@ class Timeslot: # Find platform & link if this class is online online_platform: Platform = get_platform(slot_dict.get("online", None)) - online_link = course_dict["online_links"][online_platform.value["rep"]] if online_platform is not None else None + + # Custom online link for this day if it exists, else the general link for this platform + online_link = \ + slot_dict["online_link"] if "online_link" in slot_dict else \ + course_dict["online_links"][online_platform.value["rep"]] \ + if online_platform is not None \ + else None return Timeslot(course=course, start_time=start_time, end_time=end_time, canceled="canceled" in slot_dict, is_special=special, location=location, online_platform=online_platform, online_link=online_link)