diff --git a/sqlmodel/main.py b/sqlmodel/main.py index 0a7df79..0432bde 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -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