Skip to content

Commit ab774b5

Browse files
svlandegYuriiMotov
andauthored
commit suggestion by Yurii
Co-authored-by: Motov Yurii <[email protected]>
1 parent e4a5f6e commit ab774b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmodel/_compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ def is_field_noneable(field: "FieldInfo") -> bool:
462462

463463
def get_sa_type_from_field(field: Any) -> Any:
464464
if get_origin(field.type_) is Literal:
465-
return AutoString
466-
elif isinstance(field.type_, type) and field.shape == SHAPE_SINGLETON:
465+
return Literal
466+
if isinstance(field.type_, type) and field.shape == SHAPE_SINGLETON:
467467
return field.type_
468468
raise ValueError(f"The field {field.name} has no matching SQLAlchemy type")
469469

0 commit comments

Comments
 (0)