Skip to content

Commit b3308d7

Browse files
Merge pull request #2 from kleschenko/patch-1
Fix TypeError for complex types
2 parents 244c947 + 6828d80 commit b3308d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sqlmodel/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ def get_sqlalchemy_type(field: FieldInfo) -> Any:
474474
if type2 is pydantic.AnyUrl:
475475
meta = get_args(type_)[1]
476476
return AutoString(length=meta.max_length)
477+
type_ = type2
477478
elif org_type is pydantic.AnyUrl and type(type_) is _AnnotatedAlias:
478479
return AutoString(type_.__metadata__[0].max_length)
479480

0 commit comments

Comments
 (0)