Update document request serializer to return requester full name

This commit is contained in:
Keannu Bernasol 2025-01-06 14:17:40 +08:00
parent 8655a79e8b
commit 14f21bd2a8

View file

@ -82,7 +82,7 @@ class DocumentRequestSerializer(serializers.ModelSerializer):
)
requester = serializers.SlugRelatedField(
many=False,
slug_field="email",
slug_field="full_name",
queryset=CustomUser.objects.all(),
)
purpose = serializers.CharField(max_length=512)
@ -127,7 +127,7 @@ class FullDocumentRequestSerializer(serializers.ModelSerializer):
documents = DocumentRequestUnitWithFileSerializer()
requester = serializers.SlugRelatedField(
many=False,
slug_field="email",
slug_field="full_name",
queryset=CustomUser.objects.all(),
required=False,
)