Skip to content

Commit 267cd42

Browse files
authored
✏️ Fix typo in internal function name get_sqlachemy_type() (#496)
Corrected name is get_sqlalchemy_type().
1 parent 497270d commit 267cd42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmodel/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def __init__(
371371
ModelMetaclass.__init__(cls, classname, bases, dict_, **kw)
372372

373373

374-
def get_sqlachemy_type(field: ModelField) -> Any:
374+
def get_sqlalchemy_type(field: ModelField) -> Any:
375375
if issubclass(field.type_, str):
376376
if field.field_info.max_length:
377377
return AutoString(length=field.field_info.max_length)
@@ -418,7 +418,7 @@ def get_column_from_field(field: ModelField) -> Column: # type: ignore
418418
sa_column = getattr(field.field_info, "sa_column", Undefined)
419419
if isinstance(sa_column, Column):
420420
return sa_column
421-
sa_type = get_sqlachemy_type(field)
421+
sa_type = get_sqlalchemy_type(field)
422422
primary_key = getattr(field.field_info, "primary_key", False)
423423
index = getattr(field.field_info, "index", Undefined)
424424
if index is Undefined:

0 commit comments

Comments
 (0)