Skip to content

Commit 77a8015

Browse files
committed
Move ret str check back to where it was
1 parent 1b5a84a commit 77a8015

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rest_framework/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ def _encode_data(self, data, format=None, content_type=None):
189189
content_type, renderer.charset
190190
)
191191

192-
# Coerce text to bytes if required.
193-
if isinstance(ret, str):
194-
ret = ret.encode(renderer.charset)
192+
# Coerce text to bytes if required.
193+
if isinstance(ret, str):
194+
ret = ret.encode(renderer.charset)
195195

196196
return ret, content_type
197197

0 commit comments

Comments
 (0)