diff --git a/backend/app/documents/router.py b/backend/app/documents/router.py index 7d3eea4db..f35974296 100644 --- a/backend/app/documents/router.py +++ b/backend/app/documents/router.py @@ -49,9 +49,9 @@ def get_requesting_user_email(user: Any = Depends(validate_jwt_token)) -> str: ADR-0059: the route resolves the user (JWT ``dbId`` -> ``UserModel``) rather than only gating the token, and threads the email into the job.""" - email = getattr(user, "email", None) + email: Any = getattr(user, "email", None) if email is None and isinstance(user, dict): - email = user.get("email") + email = cast(dict[str, Any], user).get("email") if not email: raise HTTPException( status_code=400,