Island: Prefer existing OS data to ping OS data

Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
This commit is contained in:
Kekoa Kaaikala 2022-09-29 11:30:31 -04:00
parent 9b30770777
commit d811c6548c
1 changed files with 1 additions and 1 deletions

View File

@ -65,6 +65,6 @@ class handle_ping_scan_event:
return self._machine_repository.get_machine_by_id(agent.machine_id)
def _update_destination_machine(self, machine: Machine, event: PingScanEvent):
if event.os is not None:
if event.os is not None and machine.operating_system is None:
machine.operating_system = event.os
self._machine_repository.upsert_machine(machine)