DRF uses query_params instead of QUERY_PARAMS.
TNL-3442
This commit is contained in:
@@ -146,7 +146,7 @@ class AccountView(APIView):
|
||||
GET /api/user/v1/accounts/{username}/
|
||||
"""
|
||||
try:
|
||||
account_settings = get_account_settings(request, username, view=request.QUERY_PARAMS.get('view'))
|
||||
account_settings = get_account_settings(request, username, view=request.query_params.get('view'))
|
||||
except UserNotFound:
|
||||
return Response(status=status.HTTP_403_FORBIDDEN if request.user.is_staff else status.HTTP_404_NOT_FOUND)
|
||||
|
||||
|
||||
@@ -823,7 +823,7 @@ class ForumRoleUsersListView(generics.ListAPIView):
|
||||
Return a list of users with the specified role/course pair
|
||||
"""
|
||||
name = self.kwargs['name']
|
||||
course_id_string = self.request.QUERY_PARAMS.get('course_id')
|
||||
course_id_string = self.request.query_params.get('course_id')
|
||||
if not course_id_string:
|
||||
raise ParseError('course_id must be specified')
|
||||
course_id = SlashSeparatedCourseKey.from_deprecated_string(course_id_string)
|
||||
|
||||
Reference in New Issue
Block a user