mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-27 20:43:46 +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
|
||||
)
|
||||
|
||||
# Coerce text to bytes if required.
|
||||
if isinstance(ret, str):
|
||||
ret = ret.encode(renderer.charset)
|
||||
# Coerce text to bytes if required.
|
||||
if isinstance(ret, str):
|
||||
ret = ret.encode(renderer.charset)
|
||||
|
||||
return ret, content_type
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user