From b21a992a72ce509df914dd601700bc56bac7706e Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Fri, 19 Jul 2024 16:02:19 +0500 Subject: [PATCH] feat: upgrading simple api to drf compatible. --- lms/djangoapps/instructor/views/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index e817d5037877..757a5c606d56 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -294,6 +294,7 @@ class RegisterAndEnrollStudents(APIView): ) permission_classes = (IsAuthenticated, permissions.InstructorPermission) permission_name = permissions.CAN_ENROLL + @method_decorator(ensure_csrf_cookie) def post(self, request, course_id): # pylint: disable=too-many-statements """