From b5d2ad3cac741f6593b313996868dddf8da46bf6 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Fri, 21 Apr 2023 23:45:13 +0800 Subject: [PATCH] Hotfix for subjectstudent serializer --- infotech/subjects/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infotech/subjects/serializers.py b/infotech/subjects/serializers.py index 702a979..8ef6883 100644 --- a/infotech/subjects/serializers.py +++ b/infotech/subjects/serializers.py @@ -6,7 +6,7 @@ from students.models import Student class SubjectSerializer(serializers.HyperlinkedModelSerializer): students = serializers.SlugRelatedField( - queryset=Student.objects.all(), many=True, slug_field='full_name', allow_null=True) + queryset=Student.objects.all(), many=True, slug_field='last_name', allow_null=True) class Meta: model = Subject