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=True, null=True)
Although blank=True, null=True
, when I try to post a MyModel
JSON without a my_other_models
field I get a "this field is required" error.