web/views/editcontroller.py
branchstable
changeset 9196 13461cb8ff40
parent 9179 570208f74a84
child 9256 697a8181ba30
--- a/web/views/editcontroller.py	Thu Jul 25 18:14:56 2013 +0200
+++ b/web/views/editcontroller.py	Fri Jul 26 13:47:52 2013 +0200
@@ -166,7 +166,10 @@
                             if target_eid in values_by_eid:
                                 # add dependency from the target entity to the
                                 # current one
-                                graph.setdefault(target_eid, set()).add(eid)
+                                if role == 'object':
+                                    graph.setdefault(target_eid, set()).add(eid)
+                                else:
+                                    graph.setdefault(eid, set()).add(target_eid)
                                 break
         for eid in reversed(ordered_nodes(graph)):
             yield values_by_eid[eid]