Skip to content

Commit 9d189e1

Browse files
committed
aiohttp response body check none fix
1 parent 37bfb36 commit 9d189e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: openapi_core/contrib/aiohttp/responses.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def __init__(self, response: web.Response):
1414

1515
@property
1616
def data(self) -> str:
17+
if self.response.body is None:
18+
return ""
1719
if isinstance(self.response.body, bytes):
1820
return self.response.body.decode("utf-8")
1921
assert isinstance(self.response.body, str)

0 commit comments

Comments
 (0)