Commit cdaa942a authored by Aurelien Campeas's avatar Aurelien Campeas
Browse files

[adapters] fix a name stomping error (entity)

Also give proper name to subject (role, not target),
and kill unused variable.

branch : stable
parent 030745ac9873
......@@ -106,17 +106,16 @@ class IFTIndexableAdapter(view.EntityAdapter):
containers = tuple(entity.e_schema.fulltext_containers())
if containers:
for rschema, target in containers:
if target == 'object':
for rschema, role in containers:
if role == 'object':
targets = getattr(entity, rschema.type)
targets = getattr(entity, 'reverse_%s' % rschema)
for entity in targets:
if entity.eid in _done:
for target in targets:
if target.eid in _done:
for container in entity.cw_adapt_to('IFTIndexable').fti_containers(_done):
for container in target.cw_adapt_to('IFTIndexable').fti_containers(_done):
yield container
yielded = True
yield entity
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment