feat: fetch and filter out restricted course runs #939
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Local Testing
Set up a restricted course run locally
It'll be associated with DemoX: https://2u-internal.atlassian.net/wiki/spaces/SOL/pages/1317306375/Setting+up+restricted+runs+locally
Enable the setting
In your
private.py
settings file, setSHOULD_FETCH_RESTRICTED_COURSE_RUNS = True
Sync full course metadata
make worker-restart worker-logs
make app-shell
and then./manage.py update_full_content_metadata --force
[restricted runs] Course edX+DemoX has restricted runs {'course-v1:edX+DemoX+restricted_run'} that will be removed.
Verify non-presence of restricted run in API
Fetch content metadata for the DemoX course in enterprise-catalog, i.e.
Observe that the restricted run is not included in the payload.
ENT-9404
Post-review