File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 26
26
class SQLAlchemyConnectionField (ConnectionField ):
27
27
@property
28
28
def type (self ):
29
- from .types import SQLAlchemyObjectType
29
+ from .types import SQLAlchemyBase
30
30
31
31
type_ = super (ConnectionField , self ).type
32
32
nullable_type = get_nullable_type (type_ )
33
33
if issubclass (nullable_type , Connection ):
34
34
return type_
35
- assert issubclass (nullable_type , SQLAlchemyObjectType ), (
36
- "SQLALchemyConnectionField only accepts SQLAlchemyObjectType types, not {}"
35
+ assert issubclass (nullable_type , SQLAlchemyBase ), (
36
+ "SQLALchemyConnectionField only accepts SQLAlchemyBase types, not {}"
37
37
).format (nullable_type .__name__ )
38
38
assert nullable_type .connection , "The type {} doesn't have a connection" .format (
39
39
nullable_type .__name__
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def resolver(_obj, _info):
51
51
52
52
53
53
def test_type_assert_sqlalchemy_object_type ():
54
- with pytest .raises (AssertionError , match = "only accepts SQLAlchemyObjectType " ):
54
+ with pytest .raises (AssertionError , match = "only accepts SQLAlchemyBase types " ):
55
55
SQLAlchemyConnectionField (ObjectType ).type
56
56
57
57
You can’t perform that action at this time.
0 commit comments