Commit 94cb043a authored by Bruno Martin's avatar Bruno Martin
Browse files

simplify GroupAdminSerializer

parent c2a2aa22
......@@ -2,6 +2,7 @@ from rest_framework import serializers
from django.contrib.auth.models import Group
from baquara.users.serializers import SimpleUserSerializer
from courses.models import Course, Class
# from courses.serializers import ClassSerializer as CoreClassSerializer
# from courses_legacy.core.serializers import ClassSerializer as CoreClassSerializer
......@@ -24,12 +25,11 @@ class GroupSerializer(serializers.ModelSerializer):
class GroupAdminSerializer(serializers.ModelSerializer):
# users = TimtecUserSerializer(many=True, read_only=True, source="user_set")
users = SimpleUserSerializer(many=True, read_only=True, source="user_set")
class Meta:
model = Group
fields = ('id', 'name', 'users', )
depth = 1
class ClassSerializer(serializers.ModelSerializer):
......
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