Tuesday, January 30, 2018

Re: Django api call in view unable to save for foreign key userId

Hi,


Le 2018-01-29 à 22:31, cherngyorng@gmail.com a écrit :
{"patientId":["This field is required."]}.

This is a generic form validation error. I suspect the problem is with the following code:
class BookApptSerializer(serializers.ModelSerializer):      patientId = MyUserSerializer(many=False)
Perhaps you could trace the error in serializers.ModelSerializer by using pdb ?

Etienne
    --   Etienne Robillard  tkadm30@yandex.com  https://www.isotopesoftware.ca/

No comments:

Post a Comment