Skip to content

Commit

Permalink
Move ret str check back to where it was
Browse files Browse the repository at this point in the history
  • Loading branch information
sliverc committed Jan 8, 2025
1 parent 1b5a84a commit 77a8015
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rest_framework/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ def _encode_data(self, data, format=None, content_type=None):
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

Expand Down

0 comments on commit 77a8015

Please sign in to comment.