Commit 623436c3 authored by Łukasz Nowak's avatar Łukasz Nowak

Check that list of predecessor is unique.

parent 76f1b99d
...@@ -171,6 +171,9 @@ else:\n ...@@ -171,6 +171,9 @@ else:\n
raise ValueError, "state should be started, stopped or destroyed"\n raise ValueError, "state should be started, stopped or destroyed"\n
\n \n
predecessor_list = requester_instance.getPredecessorList() + [request_software_instance.getRelativeUrl()]\n predecessor_list = requester_instance.getPredecessorList() + [request_software_instance.getRelativeUrl()]\n
\n
assert predecessor_list == list(set(predecessor_list))\n
\n
# update graph to reflect requested operation\n # update graph to reflect requested operation\n
graph[requester_instance.getUid()] = requester_instance.getPredecessorUidList() + [request_software_instance.getUid()]\n graph[requester_instance.getUid()] = requester_instance.getPredecessorUidList() + [request_software_instance.getUid()]\n
requester_instance.edit(predecessor_list=predecessor_list)\n requester_instance.edit(predecessor_list=predecessor_list)\n
......
19 20
\ No newline at end of file \ 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