From f9b585108e6a6595ced42827c3f8ba930b17993f Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sat, 22 Apr 2023 12:31:27 +0800 Subject: [PATCH] Fixed full_name in professor serializer --- infotech/professors/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infotech/professors/serializers.py b/infotech/professors/serializers.py index b4b92c1..897cd98 100644 --- a/infotech/professors/serializers.py +++ b/infotech/professors/serializers.py @@ -9,6 +9,6 @@ class ProfessorSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Professor - fields = ('id', 'first_name', + fields = ('id', 'full_name', 'first_name', 'last_name', 'age', 'gender', 'date_joined') - read_only_fields = ('id', 'date_joined') + read_only_fields = ('id', 'date_joined', 'full_name')