We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4a5f6e commit ab774b5Copy full SHA for ab774b5
sqlmodel/_compat.py
@@ -462,8 +462,8 @@ def is_field_noneable(field: "FieldInfo") -> bool:
462
463
def get_sa_type_from_field(field: Any) -> Any:
464
if get_origin(field.type_) is Literal:
465
- return AutoString
466
- elif isinstance(field.type_, type) and field.shape == SHAPE_SINGLETON:
+ return Literal
+ if isinstance(field.type_, type) and field.shape == SHAPE_SINGLETON:
467
return field.type_
468
raise ValueError(f"The field {field.name} has no matching SQLAlchemy type")
469
0 commit comments