From cba2f232fccea5f787b87a3d9da58bcdd3368a09 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Thu, 2 Apr 2020 19:05:23 +0300 Subject: [PATCH] Changes code to only store the first bootloader telem instead of overriding it --- monkey/monkey_island/cc/services/bootloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/services/bootloader.py b/monkey/monkey_island/cc/services/bootloader.py index 49dbe3154..9f05ac45f 100644 --- a/monkey/monkey_island/cc/services/bootloader.py +++ b/monkey/monkey_island/cc/services/bootloader.py @@ -17,7 +17,7 @@ class BootloaderService: telem['os_version'] = "Unknown OS" telem_id = BootloaderService.get_mongo_id_for_bootloader_telem(telem) - mongo.db.bootloader_telems.update({'_id': telem_id}, telem, upsert=True) + mongo.db.bootloader_telems.update({'_id': telem_id}, {'$setOnInsert': telem}, upsert=True) will_monkey_run = BootloaderService.is_os_compatible(telem) try: