Skip to content

Commit

Permalink
fix decode error
Browse files Browse the repository at this point in the history
  • Loading branch information
teticio committed Sep 5, 2024
1 parent 067931e commit af9878d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ class HTMLCoder(JsonCoder):
def decode(cls, value):
"""Decode HTMLResponse.
"""
if isinstance(value, str):
value = value.encode("utf-8")
response = JsonCoder.decode(value)
return HTMLResponse(content=response['body'],
status_code=response['status_code'])
Expand Down

0 comments on commit af9878d

Please sign in to comment.