web/views/editcontroller.py
branchstable
changeset 9196 13461cb8ff40
parent 9179 570208f74a84
child 9256 697a8181ba30
equal deleted inserted replaced
9195:e9fb9377229e 9196:13461cb8ff40
   164                         if rdef.cardinality[0] == '1':
   164                         if rdef.cardinality[0] == '1':
   165                             target_eid = values[param]
   165                             target_eid = values[param]
   166                             if target_eid in values_by_eid:
   166                             if target_eid in values_by_eid:
   167                                 # add dependency from the target entity to the
   167                                 # add dependency from the target entity to the
   168                                 # current one
   168                                 # current one
   169                                 graph.setdefault(target_eid, set()).add(eid)
   169                                 if role == 'object':
       
   170                                     graph.setdefault(target_eid, set()).add(eid)
       
   171                                 else:
       
   172                                     graph.setdefault(eid, set()).add(target_eid)
   170                                 break
   173                                 break
   171         for eid in reversed(ordered_nodes(graph)):
   174         for eid in reversed(ordered_nodes(graph)):
   172             yield values_by_eid[eid]
   175             yield values_by_eid[eid]
   173 
   176 
   174     def _default_publish(self):
   177     def _default_publish(self):