From 52164211b03eb177be00562537da7d536d70c7a2 Mon Sep 17 00:00:00 2001 From: Shiva Menta Date: Wed, 20 Nov 2024 18:30:28 -0500 Subject: [PATCH 1/2] Small Fix --- backend/courses/management/commands/sync_path_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/courses/management/commands/sync_path_status.py b/backend/courses/management/commands/sync_path_status.py index d74ca12f..6276986c 100644 --- a/backend/courses/management/commands/sync_path_status.py +++ b/backend/courses/management/commands/sync_path_status.py @@ -156,7 +156,7 @@ def resolve_path_differences(send_data_to_slack=False, verbose=False): print(f"{len(path_course_to_status)} section statuses fetched from Path.") inconsistent_courses = [] - for course, db_status in enumerate(db_course_to_status): + for course, db_status in db_course_to_status.items(): if course in path_course_to_status and db_status != path_course_to_status[course]: inconsistent_courses.append(course) if verbose: From 617efe2efbabd3411f7ab33932dc7092f8db9b71 Mon Sep 17 00:00:00 2001 From: Shiva Menta Date: Wed, 20 Nov 2024 19:14:31 -0500 Subject: [PATCH 2/2] Remove Trailing Slash --- backend/courses/management/commands/sync_path_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/courses/management/commands/sync_path_status.py b/backend/courses/management/commands/sync_path_status.py index 6276986c..8b055278 100644 --- a/backend/courses/management/commands/sync_path_status.py +++ b/backend/courses/management/commands/sync_path_status.py @@ -48,7 +48,7 @@ async def send_webhook_request( ) -> None: async with webhook_semaphore: await async_session.post( - url="https://penncoursealert.com/webhook/", + url="https://penncoursealert.com/webhook", data=json.dumps(format_webhook_request_body(course, course_status, semester)), headers={"Content-Type": "application/json", "Authorization": f"Basic {auth.decode()}"}, )