From a0b84c574d46b4574be406fedbf29357fff2a35a Mon Sep 17 00:00:00 2001 From: honglei Date: Tue, 15 Aug 2023 00:59:49 +0800 Subject: [PATCH] avoid compare types:FunctionType --- sqlmodel/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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