Commit 7d4ab20a authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Change student class serializer

parent c35d0d65
from rest_framework import serializers
from baquara.users.serializers import SimpleUserSerializer, TimtecUserAdminCertificateSerializer
from baquara.users.serializers import SimpleUserSerializer, ClassSimpleUserSerializer, \
TimtecUserAdminCertificateSerializer
from courses.models import CourseStudent
from courses.serializers import BasicCourseSerializer
......@@ -72,5 +73,5 @@ class ClassSerializer(WorkspaceBaseSerializerMixin, serializers.ModelSerializer)
def get_students_serializer(self, obj):
serializer_context = { 'course_id': obj.id }
serializer = SimpleUserSerializer(obj.valid_students, many=True, read_only=True, context=serializer_context)
serializer = ClassSimpleUserSerializer(obj.valid_students, many=True, read_only=True, context=serializer_context)
return serializer.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