We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dfdef45 + 0580aaf commit 4f6352bCopy full SHA for 4f6352b
src/fastapi_shield/shield.py
@@ -595,7 +595,7 @@ async def wrapper(*args, **kwargs):
595
# hence we should raise an error from now on if anything goes wrong
596
request = kwargs.get("request")
597
598
- if not request and not isinstance(request, Request):
+ if not request or not isinstance(request, Request):
599
raise HTTPException(
600
status.HTTP_400_BAD_REQUEST,
601
detail="Request is required or `request` is not of type `Request`",
0 commit comments