Skip to content

Commit 4f6352b

Browse files
authored
Merge pull request #82 from jymchng/gh-#80-req-diff-name
#79; changed to for check
2 parents dfdef45 + 0580aaf commit 4f6352b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastapi_shield/shield.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ async def wrapper(*args, **kwargs):
595595
# hence we should raise an error from now on if anything goes wrong
596596
request = kwargs.get("request")
597597

598-
if not request and not isinstance(request, Request):
598+
if not request or not isinstance(request, Request):
599599
raise HTTPException(
600600
status.HTTP_400_BAD_REQUEST,
601601
detail="Request is required or `request` is not of type `Request`",

0 commit comments

Comments
 (0)