Skip to content

Commit

Permalink
fix hybrid property
Browse files Browse the repository at this point in the history
  • Loading branch information
art1415926535 committed Sep 6, 2020
1 parent 7a5dea5 commit 3cb44da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphene_sqlalchemy_filter/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _get_class(obj: 'GRAPHENE_OBJECT_OR_CLASS') -> 'Type[graphene.ObjectType]':


def _eq_filter(field: 'Column', value: 'Any') -> 'Any':
column_type = field.type
column_type = getattr(field, 'type', None)
if isinstance(column_type, postgresql.ARRAY):
value = cast(value, column_type)

Expand Down Expand Up @@ -834,7 +834,7 @@ def _translate_filter(
except AttributeError:
raise KeyError('Field not found: ' + field)

model_field_type = model_field.type
model_field_type = getattr(model_field, 'type', None)
if isinstance(model_field_type, sqltypes.Enum):
value = model_field_type.enum_class(value)

Expand Down

0 comments on commit 3cb44da

Please sign in to comment.