From f7ab5c5dd8f5fed4a7582960d16301e61a54c3e3 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 14 Sep 2022 12:54:49 -0400 Subject: [PATCH] Common: Use MachineID instead of int in AbstractAgentEvent.target --- monkey/common/events/abstract_agent_event.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/common/events/abstract_agent_event.py b/monkey/common/events/abstract_agent_event.py index 760061aa1..8c3655602 100644 --- a/monkey/common/events/abstract_agent_event.py +++ b/monkey/common/events/abstract_agent_event.py @@ -6,7 +6,7 @@ from typing import FrozenSet, Union from pydantic import Field from common.base_models import InfectionMonkeyBaseModel -from common.types import AgentID +from common.types import AgentID, MachineID class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC): @@ -25,6 +25,6 @@ class AbstractAgentEvent(InfectionMonkeyBaseModel, ABC): """ source: AgentID - target: Union[int, IPv4Address, None] = Field(default=None) + target: Union[MachineID, IPv4Address, None] = Field(default=None) timestamp: float = Field(default_factory=time.time) tags: FrozenSet[str] = Field(default_factory=frozenset)