fix: thread will only be returned for matching course ID - #31340
Merged
Conversation
mehaknasir
requested review from
AhtishamShahid,
asadazam93 and
saadyousafarbi
November 23, 2022 16:53
asadazam93
suggested changes
Nov 28, 2022
asadazam93
left a comment
Contributor
There was a problem hiding this comment.
Can we also add a test case where it raises the thread not found error?
asadazam93
approved these changes
Nov 30, 2022
saadyousafarbi
approved these changes
Nov 30, 2022
Contributor
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
Contributor
|
EdX Release Notice: This PR has been deployed to the production environment. |
1 similar comment
Contributor
|
EdX Release Notice: This PR has been deployed to the production environment. |
arbrandes
pushed a commit
that referenced
this pull request
Dec 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Thread API was returning thread data even for the course the thread is not part of this has been handled in this PR and related frontend change has also been added in a separate PR for discussion MFE
Supporting information
https://2u-internal.atlassian.net/browse/INF-669
openedx/frontend-app-discussions#360
Testing instructions
copy a thread Id from a valid course and append it in the URL of some other course that thread is not part of, the API should return 404 in this case.
http://localhost:18000/api/discussion/v1/threads/{some_valid_thread_id}/?requested_fields=profile_image&course_id={some_valid_but_unrelated_course_id}
make sure to test the positive use case too
Deadline