Return email in questionnaire client field

This commit is contained in:
Keannu Bernasol 2024-11-29 21:15:50 +08:00
parent 98e12dd15e
commit f204b7e79e

View file

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