mirror of
https://github.com/PaiGramTeam/sqlmodel.git
synced 2024-11-22 07:08:06 +00:00
avoid compare types:FunctionType
This commit is contained in:
parent
ce0064b286
commit
a0b84c574d
@ -177,7 +177,7 @@ def Field(
|
||||
) -> Any:
|
||||
current_schema_extra = schema_extra or {}
|
||||
if default is PydanticUndefined:
|
||||
if type(sa_column) is types.FunctionType: #lambda
|
||||
if isinstance(sa_column, types.FunctionType): #lambda
|
||||
sa_column_ = sa_column()
|
||||
else:
|
||||
sa_column_ = sa_column
|
||||
|
Loading…
Reference in New Issue
Block a user