mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-28 04:53:43 +03:00
Move ret str check back to where it was
This commit is contained in:
parent
1b5a84ab8b
commit
77a8015a32
|
@ -189,9 +189,9 @@ class APIRequestFactory(DjangoRequestFactory):
|
||||||
content_type, renderer.charset
|
content_type, renderer.charset
|
||||||
)
|
)
|
||||||
|
|
||||||
# Coerce text to bytes if required.
|
# Coerce text to bytes if required.
|
||||||
if isinstance(ret, str):
|
if isinstance(ret, str):
|
||||||
ret = ret.encode(renderer.charset)
|
ret = ret.encode(renderer.charset)
|
||||||
|
|
||||||
return ret, content_type
|
return ret, content_type
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user