[Fixed]-Djangorestframework serializer errors: {u'non_field_errors': [u'No input provided']}

20👍

You’re providing a person instance to be updated by the serializer, but no accompanying data to update that instance with.

If you want to deserialize some request data to update that instance with then you’re missing the data argument, for example:

PersonSerializer(person, data=request.DATA, partial=True)

However it sounds like the endpoint you want doesn’t actually expect to deal with any input data (it’s just an empty PUT request you’re making right?) In which case you don’t want/need to be using a serializer at all.

Leave a comment