fix unittest_repository
authorsylvain.thenault@logilab.fr
Mon, 19 Jan 2009 08:57:34 +0100
changeset 440 3b3c2b6699fd
parent 439 7cb7cb318983
child 441 49e4717e2371
fix unittest_repository
common/entity.py
--- a/common/entity.py	Fri Jan 16 18:31:40 2009 +0100
+++ b/common/entity.py	Mon Jan 19 08:57:34 2009 +0100
@@ -998,6 +998,7 @@
         _done.add(self.eid)
         containers = tuple(self.e_schema.fulltext_containers())
         if containers:
+            yielded = False
             for rschema, target in containers:
                 if target == 'object':
                     targets = getattr(self, rschema.type)
@@ -1008,6 +1009,9 @@
                         continue
                     for container in entity.fti_containers(_done):
                         yield container
+                        yielded = True
+            if not yielded:
+                yield self
         else:
             yield self