mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 08:14:16 +03:00
Merge pull request #1847 from hamishcampbell/master
Stop the API Client converting empty lists/dicts to empty strings
This commit is contained in:
commit
880ec3fe97
|
@ -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, (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user