Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
fix call to convert_sqlalchemy_type to take a type
Browse files Browse the repository at this point in the history
  • Loading branch information
polgfred committed Jan 18, 2023
1 parent 0ec819c commit 5123b0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion graphene_sqlalchemy_filter/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,12 @@ def _get_gql_type_from_sqla_type(
if column_type is None:
return GenericScalar
else:
_type = convert_sqlalchemy_type(column_type, sqla_column)
# `convert_sqlalchemy_type` expects a type now
# - see https://github.com/graphql-python/graphene-sqlalchemy/pull/371
# (Breaking Change: The first argument to converter functions is always a type)
if not isinstance(column_type, type):
column_type = type(column_type)
_type = convert_sqlalchemy_type(column_type, column=sqla_column)
if inspect.isfunction(_type):
return _type() # only graphene-sqlalchemy>2.2.0
return _type
Expand Down

0 comments on commit 5123b0a

Please sign in to comment.