From a1abbce3a51035e96c9c60be850a24378cf0a8d2 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 12 Mar 2026 22:17:00 +0100 Subject: [PATCH] assert evaluate_forwardref is not None --- fastapi/_compat/v2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fastapi/_compat/v2.py b/fastapi/_compat/v2.py index 38ca8ba7a3..11b17b9fa0 100644 --- a/fastapi/_compat/v2.py +++ b/fastapi/_compat/v2.py @@ -43,6 +43,7 @@ Undefined = PydanticUndefined evaluate_forwardref = getattr(_pydantic_typing_extra, "try_eval_type", None) if evaluate_forwardref is None: evaluate_forwardref = _pydantic_typing_extra.eval_type_lenient +assert evaluate_forwardref is not None class GenerateJsonSchema(_GenerateJsonSchema):