Commits

Matthew Schinckel committed ef385c9

Don't explode if a ContentType is set, and no Content is provided.

Comments (0)

Files changed (1)

rest_api/serializers/__init__.py

         serializer = inspect_content(request.raw_post_data)
     if serializer:
         raw_post_data = remove_invalid_chars(request.raw_post_data)
-        return serializer.deserialize(raw_post_data)
+        if len(raw_post_data):
+            return serializer.deserialize(raw_post_data)
     
     if request.method in ["POST", "PUT"]:
         raw_post_data = request.raw_post_data