cubicweb/entities/adapters.py
branch3.26
changeset 12432 2fcb53ee5178
parent 12160 608481168432
child 12512 661dd0436c01
equal deleted inserted replaced
12431:a570191d67b0 12432:2fcb53ee5178
   398                 self.error('loop in %s tree: %s', entity.cw_etype.lower(), entity)
   398                 self.error('loop in %s tree: %s', entity.cw_etype.lower(), entity)
   399                 break
   399                 break
   400             path.append(entity.eid)
   400             path.append(entity.eid)
   401             try:
   401             try:
   402                 # check we are not jumping to another tree
   402                 # check we are not jumping to another tree
   403                 if (adapter.tree_relation != self.tree_relation or
   403                 if (adapter.tree_relation != self.tree_relation
   404                         adapter.child_role != self.child_role):
   404                         or adapter.child_role != self.child_role):
   405                     break
   405                     break
   406                 entity = adapter.parent()
   406                 entity = adapter.parent()
   407                 adapter = entity.cw_adapt_to('ITree')
   407                 adapter = entity.cw_adapt_to('ITree')
   408             except AttributeError:
   408             except AttributeError:
   409                 break
   409                 break