Skip to content

Commit

Permalink
[FIX] fast_api_auth_jwt: improve readability
Browse files Browse the repository at this point in the history
Same result as before but more explicit.
  • Loading branch information
sbidoul committed Dec 14, 2023
1 parent 883c8fb commit 155c710
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fastapi_auth_jwt/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def __call__(
if not self.allow_unauthenticated or validator.partner_id_required:
_logger.info("Could not determine partner from JWT payload.")
raise HTTPException(status_code=HTTP_401_UNAUTHORIZED)
return env["res.partner"].with_user(uid).browse()
return env["res.partner"].with_user(uid).browse(partner_id)


Expand Down

0 comments on commit 155c710

Please sign in to comment.