From 155c71005b2984fde10e8fb33ab1df072ec0e382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Thu, 14 Dec 2023 12:16:39 +0100 Subject: [PATCH] [FIX] fast_api_auth_jwt: improve readability Same result as before but more explicit. --- fastapi_auth_jwt/dependencies.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastapi_auth_jwt/dependencies.py b/fastapi_auth_jwt/dependencies.py index dce7cf04..12d1516a 100644 --- a/fastapi_auth_jwt/dependencies.py +++ b/fastapi_auth_jwt/dependencies.py @@ -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)