Fixed full_name in professor serializer

This commit is contained in:
keannu125 2023-04-22 12:31:27 +08:00
parent 98392344a1
commit f9b585108e

View file

@ -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')