We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b995766 commit b3fcaf0Copy full SHA for b3fcaf0
sqlmodel/_compat.py
@@ -165,7 +165,7 @@ def is_field_noneable(field: "FieldInfo") -> bool:
165
return False
166
167
168
- def get_type_from_field(field: Any) -> type:
+ def get_type_from_field(field: Any) -> Any:
169
type_: Any = field.annotation
170
# Resolve Optional fields
171
if type_ is None:
@@ -429,7 +429,7 @@ def is_field_noneable(field: "FieldInfo") -> bool:
429
)
430
return field.allow_none # type: ignore[no-any-return, attr-defined]
431
432
433
if isinstance(field.type_, type) and field.shape == SHAPE_SINGLETON:
434
return field.type_
435
raise ValueError(f"The field {field.name} has no matching SQLAlchemy type")
0 commit comments