Skip to content

Commit 3d6237c

Browse files
authored
Merge pull request #674 from python-openapi/fix/aiohttp-response-body-none-fix
aiohttp response body check none fix
2 parents 37bfb36 + 9d189e1 commit 3d6237c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

openapi_core/contrib/aiohttp/responses.py

Lines changed: 2 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy