From 5f71efb0cb949d0d63411a953a8474d52cdecd48 Mon Sep 17 00:00:00 2001 From: shankar ambady Date: Thu, 20 Jun 2024 13:04:17 -0400 Subject: [PATCH 1/2] removing check for live attribute --- learning_resources/etl/mitxonline.py | 1 - 1 file changed, 1 deletion(-) diff --git a/learning_resources/etl/mitxonline.py b/learning_resources/etl/mitxonline.py index e25ec6a283..3e8be5c938 100644 --- a/learning_resources/etl/mitxonline.py +++ b/learning_resources/etl/mitxonline.py @@ -227,7 +227,6 @@ def _transform_course(course): "published": bool( parse_page_attribute(course, "page_url") and parse_page_attribute(course, "live") - and course.get("live", False) ), # a course is only considered published if it has a page url "professional": False, "certification": has_certification, From a0d6cca7d5fe939355a516bf193f6d4b8016e77f Mon Sep 17 00:00:00 2001 From: shankar ambady Date: Thu, 20 Jun 2024 13:18:18 -0400 Subject: [PATCH 2/2] fixing tests --- learning_resources/etl/mitxonline_test.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/learning_resources/etl/mitxonline_test.py b/learning_resources/etl/mitxonline_test.py index d1fc49f321..18aa49ef44 100644 --- a/learning_resources/etl/mitxonline_test.py +++ b/learning_resources/etl/mitxonline_test.py @@ -195,7 +195,6 @@ def test_mitxonline_transform_programs( "published": bool( course_data.get("page", {}).get("page_url", None) and course_data.get("page", {}).get("live", None) - and course_data.get("live", None) ), "certification": True, "certification_type": CertificationType.completion.name, @@ -308,7 +307,6 @@ def test_mitxonline_transform_courses(settings, mock_mitxonline_courses_data): "published": bool( course_data.get("page", {}).get("page_url", None) and course_data.get("page", {}).get("live", None) - and course_data.get("live", None) ), "professional": False, "certification": parse_certification(