Commit 01d6982a authored by Łukasz Nowak's avatar Łukasz Nowak

Check graph before modification.

This will not lead to side effects like recursive reindexation.
parent 8461614c
......@@ -190,11 +190,12 @@ assert predecessor_list == uniq_predecessor_list, "%s != %s" % (predecessor_list
\n
# update graph to reflect requested operation\n
graph[requester_instance.getUid()] = requester_instance.getPredecessorUidList() + [request_software_instance.getUid()]\n
requester_instance.edit(predecessor_list=predecessor_list)\n
\n
# check if all elements are still connected and if there is no cycle\n
request_software_instance.checkConnected(graph, hosting_subscription.getUid())\n
request_software_instance.checkNotCyclic(graph)\n
\n
requester_instance.edit(predecessor_list=predecessor_list)\n
]]></string> </value>
......
31
\ No newline at end of file
32
\ No newline at end of file
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