No edge from island to itself anymore

This commit is contained in:
Itay Mizeretz 2017-09-24 20:12:22 +03:00
parent 59132e08a0
commit 6e1cc8ccf5
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class EdgeService:
monkey = cc.services.node.NodeService.get_monkey_island_monkey()
existing_ids = [x["from"] for x in mongo.db.edge.find({"to": monkey["_id"]})]
monkey_ids = [x["_id"] for x in mongo.db.monkey.find({})
if ("tunnel" not in x) and (x["_id"] not in existing_ids)]
if ("tunnel" not in x) and (x["_id"] not in existing_ids) and (x["_id"] != monkey["_id"])]
edges = []
# We're using fake ids because the frontend graph module requires unique ids.