common/entity.py
changeset 440 3b3c2b6699fd
parent 413 a7366dd3c33c
child 478 49dfd0bb422c
--- 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