Commit d74bb366 by Peter Fogg

Fix updating immutable request dictionary.

Django's `QueryDict`s are immutable during normal running, and so they
must be copied if any updates are to be made to them. In testing,
though, `request.DATA._mutable` is `True`, so tests can falsely pass.
parent 3c2bfc70
......@@ -300,7 +300,7 @@ class TeamsListView(GenericAPIView):
if course_key and not has_team_api_access(request.user, course_key):
return Response(status=status.HTTP_403_FORBIDDEN)
data = request.DATA
data = request.DATA.copy()
data['course_id'] = course_key
serializer = CourseTeamCreationSerializer(data=data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment