Django ForeignKey Field Required Despite Blank=True And Null=True
I am using Django REST Framework and I have a MyNodel with a related MyOtherModel in a many-to-one relationship: models.ForeignKey(MyModel, related_name='my_other_models', blank=Tr
Solution 1:
In your serializer, you need to add required=False
.
field = MyModelSerializer(required=False)
Post a Comment for "Django ForeignKey Field Required Despite Blank=True And Null=True"