From f204b7e79e3b06049f9a50268a73a23454400093 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 29 Nov 2024 21:15:50 +0800 Subject: [PATCH] Return email in questionnaire client field --- docmanager_backend/questionnaires/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docmanager_backend/questionnaires/serializers.py b/docmanager_backend/questionnaires/serializers.py index 625d254..e1612c1 100644 --- a/docmanager_backend/questionnaires/serializers.py +++ b/docmanager_backend/questionnaires/serializers.py @@ -5,7 +5,7 @@ from .models import Questionnaire class QuestionnaireSerializer(serializers.ModelSerializer): client = serializers.SlugRelatedField( - many=False, slug_field="id", queryset=CustomUser.objects.all(), required=False + many=False, slug_field="email", queryset=CustomUser.objects.all(), required=False ) client_type = serializers.ChoiceField( choices=Questionnaire.CLIENT_TYPE_CHOICES)