summaryrefslogtreecommitdiff
path: root/examples/adjacencytree/byroot_tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/adjacencytree/byroot_tree.py')
-rw-r--r--examples/adjacencytree/byroot_tree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/adjacencytree/byroot_tree.py b/examples/adjacencytree/byroot_tree.py
index ccd2646a4..5c5584d96 100644
--- a/examples/adjacencytree/byroot_tree.py
+++ b/examples/adjacencytree/byroot_tree.py
@@ -99,7 +99,7 @@ class TreeLoader(MapperExtension):
if instance.parent_id is None:
result.append(instance)
else:
- if isnew or populate_existing:
+ if isnew or context.populate_existing:
parentnode = selectcontext.identity_map[mapper.identity_key(instance.parent_id)]
parentnode.children.append_without_event(instance)
# fire off lazy loader before the instance is part of the session