Fix check for manual infection

This commit is contained in:
Itay Mizeretz 2017-08-31 11:03:31 +03:00
parent 8163e39804
commit 04c86737e9
2 changed files with 7 additions and 3 deletions

View File

@ -13,6 +13,6 @@ class Node(flask_restful.Resource):
def get(self):
node_id = request.args.get('id')
if node_id:
return NodeService.get_displayed_node_by_id(request.args.get('node_id'))
return NodeService.get_displayed_node_by_id(node_id)
return {}

View File

@ -77,8 +77,12 @@ class NodeService:
@staticmethod
def get_monkey_manual_run(monkey):
# TODO: find better implementation
return monkey["parent"][0][1] == None
for p in monkey["parent"]:
if p[0] != monkey["guid"]:
return False
return True
@staticmethod
def get_monkey_label(monkey):