{"action":"opened","issue":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/3945","repository_url":"https://api.github.com/repos/tomchristie/django-rest-framework","labels_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/3945/labels{/name}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/3945/comments","events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/3945/events","html_url":"https://github.com/tomchristie/django-rest-framework/issues/3945","id":134324911,"number":3945,"title":"writte nested object doesnt work","user":{"login":"stunaz","id":1305483,"avatar_url":"https://avatars.githubusercontent.com/u/1305483?v=3","gravatar_id":"","url":"https://api.github.com/users/stunaz","html_url":"https://github.com/stunaz","followers_url":"https://api.github.com/users/stunaz/followers","following_url":"https://api.github.com/users/stunaz/following{/other_user}","gists_url":"https://api.github.com/users/stunaz/gists{/gist_id}","starred_url":"https://api.github.com/users/stunaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stunaz/subscriptions","organizations_url":"https://api.github.com/users/stunaz/orgs","repos_url":"https://api.github.com/users/stunaz/repos","events_url":"https://api.github.com/users/stunaz/events{/privacy}","received_events_url":"https://api.github.com/users/stunaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-17T16:12:50Z","updated_at":"2016-02-17T16:12:50Z","closed_at":null,"body":"Hi, I have the following models:\r\n```\r\nclass Category(models.Model):\r\n    code= models.CharField(max_length=2)\r\n    name= models.CharField(max_length=100)\r\n```\r\n\r\n```\r\nclass Question(models.Model):\r\n    category= models.ForeignKey(Category, related_name='categories')\r\n    title = models.CharField(max_length=100)\r\n```\r\n\r\nand the following serializers:\r\n\r\n```\r\nclass CategorySerializer(serializers.ModelSerializer):\r\n\r\n    class Meta:\r\n        model = Category\r\n        fields = ('code', 'name')\r\n```\r\n\r\n```\r\nclass QuestionSerializer(serializers.ModelSerializer):\r\n    category= CategorySerializer()\r\n\r\n    class Meta:\r\n        model = Question\r\n        fields = ('category', 'title')\r\n\r\n    def create(self, validated_data):\r\n        category = validated_data.pop('category')\r\n        category_obj = Category.objects.get(code=category)\r\n\r\n        return self.Meta.model.objects.create(category= category_obj, **validated_date)\r\n```\r\n\r\nSo I am just trying to `POST` a Question with an existing Category. unfortunately, it doesnt work, i get Http Status `400` with the message `The field category is required` : this si where I think there is a bug\r\n\r\nMy post looks like the following:\r\n```\r\nPOST /api/question\r\nDATA: {\"title\": \"question title\", \"category\": \"AB\"}\r\n```"}}