]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix to "populate_existing"
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 Jun 2007 23:12:08 +0000 (23:12 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 Jun 2007 23:12:08 +0000 (23:12 +0000)
examples/adjacencytree/byroot_tree.py

index ccd2646a4bab52ab0f1d7bd6a840dafdad36e2de..5c5584d9679feebc61bb79a9e802462429bf7335 100644 (file)
@@ -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