Fixed bootloader creating multiple nodes bug

This commit is contained in:
VakarisZ 2020-03-09 15:53:38 +02:00
parent 7475cff288
commit e5201a2ecf
1 changed files with 1 additions and 2 deletions

View File

@ -242,8 +242,7 @@ class NodeService:
if is_local_ips(bootloader_telem['ips']):
raise NodeCreationException("Bootloader ran on island, no need to create new node.")
new_node = mongo.db.node.find_one({"domain_name": bootloader_telem['hostname'],
"ip_addresses": bootloader_telem['ips']})
new_node = mongo.db.node.find_one({"ip_addresses": {"$in": bootloader_telem['ips']}})
if new_node is None:
new_node = NodeService.create_node_from_bootloader_telem(bootloader_telem, will_monkey_run)
if bootloader_telem['tunnel']: