diff --git a/docmanager_backend/document_requests/serializers.py b/docmanager_backend/document_requests/serializers.py index 3dd3cf8..9b3f770 100644 --- a/docmanager_backend/document_requests/serializers.py +++ b/docmanager_backend/document_requests/serializers.py @@ -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, )