Current Scenario:
The function here will not throw the error even if there are no challenge phase corresponding to the challenge.
Steps to Reproduce: You will only be able to check it only at the API level.
Let us suppose there exists a challenge with id 34 and phase ids 120, 121. Now when you will hit the url with challenge id 34 and phase id say 1 then it won't give error if phase id 1 exists(for any other challenge).
Ideally, it this url should only accept the phase ids 120 and 121 and should throw error for every other phase id.
Deliverables:
Modify the challenge phase query here to include the challenge parameter in it.
What should be added:
challenge_phase = ChallengePhase.objects.get(challenge=challenge, pk=pk)
Also, Update the response message to
response_data = {'error': 'Challenge Phase {} does not exist'.format(pk)}
@RishabhJain2018 I would like to work up on this!
Sure @HargovindArora go ahead!
@RishabhJain2018 How to check whether the changes made are showing effect? I meant how should I reproduce error after making the required changes? I tried deleting the phases of the challenges already present there, nothing happened.
@HargovindArora I have updated the description.
I would like to start contributing by working on this !!
@rakesh-1601 Sounds good! Please let us know here or on our Gitter channel if you're having any difficulties. :)
@rakesh-1601 Please feel free to take up any other issue since @HargovindArora has already opened a PR for this.
Hello. Is this issue still open? Can I work on this?
@Arpitrf looks like #1751 is already there for this. Please feel free to take any other unassigned issue.
@RishabhJain2018 I would like to work on it.
Sure!
Can I work on this issue @RishabhJain2018 ?
@kurianbenoy There is already a PR opened for this issue which is yet to be reviewed.
@kurianbenoy There is already a PR opened for this issue which is yet to be reviewed.
The travis tests for your PR is failing. That's why it's not being reviewed.