Skip to content

Commit 3010f01

Browse files
committed
Minor simplification
1 parent 0bf25fb commit 3010f01

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

graphene_sqlalchemy/converter.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ def dynamic_type():
3232
_type = registry.get_type_for_model(model)
3333
if not _type:
3434
return None
35-
if (direction == interfaces.MANYTOONE or not relationship.uselist):
35+
if direction == interfaces.MANYTOONE or not relationship.uselist:
3636
return Field(_type)
37-
elif (direction == interfaces.ONETOMANY or
38-
direction == interfaces.MANYTOMANY):
37+
elif direction in (interfaces.ONETOMANY, interfaces.MANYTOMANY):
3938
if _type._meta.connection:
4039
return createConnectionField(_type)
4140
return Field(List(_type))

0 commit comments

Comments
 (0)