I am using the Django REST Framework 2.0.
Here is my model class:
class Mission(models.Model):
assigned_to = models.ForeignKey('auth.User',
related_name='missions_assigned',
blank = True)
Here is my view class:
class MissionList(generics.ListCreateAPIView):
model = Mission
serialize_class = MissionSerializer
The multipart form is rendered in the browser with empty choice for
assigned_to
field.When posting raw JSON, I get the following error message:
Cannot assign None: "Mission.assigned_to" does not allow null values.