Commit 880ec3fe by Tom Christie

Merge pull request #1847 from hamishcampbell/master

Stop the API Client converting empty lists/dicts to empty strings
parents d4d77395 826d76a8
...@@ -36,7 +36,7 @@ class APIRequestFactory(DjangoRequestFactory): ...@@ -36,7 +36,7 @@ class APIRequestFactory(DjangoRequestFactory):
Encode the data returning a two tuple of (bytes, content_type) Encode the data returning a two tuple of (bytes, content_type)
""" """
if not data: if data is None:
return ('', content_type) return ('', content_type)
assert format is None or content_type is None, ( assert format is None or content_type is None, (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment