Skip to content

Commit 9068bad

Browse files
committed
fix enum cast
1 parent 510e421 commit 9068bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlmodel/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def get_sqlalchemy_type(field: Any) -> Any:
666666
return AutoString
667667
# Check enums first as an enum can also be a str, needed by Pydantic/FastAPI
668668
if issubclass(type_, Enum):
669-
return sa_Enum(type_)
669+
return sa_Enum(cast(Type[Enum], type_))
670670
if issubclass(
671671
type_,
672672
(

0 commit comments

Comments
 (0)