Skip to content

Commit

Permalink
Fix getting column python type (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored May 7, 2024
1 parent 805dc06 commit e01307e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sqladmin/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,13 @@ def get_direction(prop: MODEL_PROPERTY) -> str:

def get_column_python_type(column: Column) -> type:
try:
if hasattr(column.type, "impl"):
return column.type.impl.python_type
return column.type.python_type
except NotImplementedError:
if hasattr(column.type, "impl"):
try:
return column.type.impl.python_type
except NotImplementedError:
...
return str


Expand Down

0 comments on commit e01307e

Please sign in to comment.