Skip to content

Commit 455cb4f

Browse files
committed
Update the relationships doc to handle the new do_load() return
1 parent 9d2cb32 commit 455cb4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/relationship.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ example through the :class:`~gino.loader.CallableLoader`::
281281
parent_id = row[Parent.id]
282282
parent = parents.get(parent_id, None)
283283
if parent is None:
284-
parent = parent_loader.do_load(row, ctx)
284+
parent, distinct = parent_loader.do_load(row, ctx)
285285
parent.children = []
286286
parents[parent_id] = parent
287287
if row[Child.id] is not None:
288-
child = child_loader.do_load(row, ctx)
288+
child, distinct = child_loader.do_load(row, ctx)
289289
child.parent = parent # two-way reference
290290
parent.children.append(child)
291291

0 commit comments

Comments
 (0)