Skip to content

Commit 0a22ab3

Browse files
committed
Properly handle 'allow_null_body'
1 parent 0547ad8 commit 0a22ab3

File tree

1 file changed

+1
-1
lines changed
  • src/saic_ismart_client_ng/api

1 file changed

+1
-1
lines changed

src/saic_ismart_client_ng/api/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def execute_api_call(
118118
headers=headers,
119119
allow_null_body=allow_null_body,
120120
)
121-
if result is None:
121+
if result is None and not allow_null_body:
122122
msg = f"Failed to execute api call {method} {path}, was expecting a result of type {out_type} got None instead"
123123
raise SaicApiException(msg)
124124
return result

0 commit comments

Comments
 (0)