From 7a8281dabd987d2b8d273f078c4686ff3148716b Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 29 Dec 2023 18:47:21 +0800 Subject: [PATCH] Add course to slug related field for borrower in transaction serializer --- equipment_tracker/transactions/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/equipment_tracker/transactions/serializers.py b/equipment_tracker/transactions/serializers.py index 8d956b1..fea196a 100644 --- a/equipment_tracker/transactions/serializers.py +++ b/equipment_tracker/transactions/serializers.py @@ -9,10 +9,11 @@ from config.settings import DEBUG class CustomUserSerializer(serializers.ModelSerializer): name = serializers.CharField(source='__str__') + course = serializers.CharField() class Meta: model = CustomUser - fields = ['id', 'name'] + fields = ['id', 'name', 'course'] class EquipmentInstanceSerializer(serializers.ModelSerializer):