Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exclude retired coursetypes and runtypes from api #4525

Merged
merged 19 commits into from
Jan 6, 2025

Conversation

zawan-ila
Copy link
Contributor

@zawan-ila zawan-ila commented Dec 26, 2024

PROD-4259

Exclude courses and courseruns belonging to retired types in API responses.

@zawan-ila zawan-ila marked this pull request as ready for review December 27, 2024 11:40
Comment on lines 115 to 116
if self.request.method == "GET" and HIDE_RETIRED_COURSE_AND_COURSE_RUNS.is_enabled() and not get_query_param(self.request, 'include_retired'):
retired_type_ids = list(map(lambda ct: ct.id, CourseRunType.objects.filter(slug__in=settings.RETIRED_RUN_TYPES)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include_retired is semantically confusing. Is it referencing retired product, archived product, or something else? We can be explicit here, include_retired_course_types or include_retired_product_type, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@DawoudSheraz DawoudSheraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please squash the commits and add PR description before merge.

@zawan-ila zawan-ila merged commit 88b3ebf into openedx:master Jan 6, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants