mirror of https://github.com/tiangolo/fastapi.git
fix Python version check
Signed-off-by: merlinz01 <158784988+merlinz01@users.noreply.github.com>
This commit is contained in:
parent
6d1617df7f
commit
1252ed2df5
|
|
@ -734,7 +734,7 @@ async def solve_dependencies(
|
|||
|
||||
|
||||
if PYDANTIC_V2:
|
||||
if sys.hexversion >= 0x30A00000:
|
||||
if sys.hexversion >= 0x30A0000:
|
||||
|
||||
def _allows_none(field: ModelField) -> bool:
|
||||
origin = get_origin(field.type_)
|
||||
|
|
@ -749,7 +749,7 @@ if PYDANTIC_V2:
|
|||
else:
|
||||
|
||||
def _allows_none(field: ModelField) -> bool:
|
||||
return field.allow_none
|
||||
return field.allow_none # type: ignore
|
||||
|
||||
|
||||
def _validate_value_with_model_field(
|
||||
|
|
|
|||
Loading…
Reference in New Issue