Skip to content

Commit 2fc8aac

Browse files
committed
simplify path
1 parent 47e6ee5 commit 2fc8aac

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

graphene_sqlalchemy/types.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from sqlalchemy.orm.exc import NoResultFound
99
from sqlalchemy.orm.query import QueryContext
1010
from sqlalchemy.orm.strategies import SelectInLoader
11-
from sqlalchemy.orm.util import PathRegistry
1211

1312
from graphene import Field
1413
from graphene.relay import Connection, Node
@@ -265,9 +264,6 @@ def batch_load_fn(self, parents): # pylint: disable=method-hidden
265264

266265
loader = SelectInLoader(relationship_prop, (('lazy', 'selectin'),))
267266

268-
# The path is a fixed single token in this case
269-
path = PathRegistry.root + parent_mapper._path_registry
270-
271267
# Should the boolean be set to False? Does it matter for our purposes?
272268
states = [(sqlalchemy.inspect(parent), True) for parent in parents]
273269

@@ -276,7 +272,7 @@ def batch_load_fn(self, parents): # pylint: disable=method-hidden
276272

277273
loader._load_for_path(
278274
query_context,
279-
path,
275+
parent_mapper._path_registry,
280276
states,
281277
None,
282278
child_mapper,

0 commit comments

Comments
 (0)