Make sure all of a PlainAlbum's children are cached in getChildren
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 28 Jan 2005 21:36:29 +0000 (21:36 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 28 Jan 2005 21:36:29 +0000 (21:36 +0000)
before yielding them to the caller. Otherwise only some of the
children end up in the cache if the caller doesn't iterate through all
returned objects. Fixes ticket #77.

src/lib/kofoto/shelf.py

index cf16f49..3433982 100644 (file)
@@ -1775,6 +1775,7 @@ class PlainAlbum(Album):
         for (objid,) in cursor:
             child = self.shelf.getObject(objid)
             self.children.append(child)
+        for child in self.children:
             yield child