From a68a765722568fdef452dfeea7e2a82c4ace714f Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 13 Sep 2022 17:31:34 +0200 Subject: [PATCH] Common: Make CredentialsStolenEvent to be a class --- monkey/common/events/credentials_stolen_events.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monkey/common/events/credentials_stolen_events.py b/monkey/common/events/credentials_stolen_events.py index c9f19e5d3..06d2f967e 100644 --- a/monkey/common/events/credentials_stolen_events.py +++ b/monkey/common/events/credentials_stolen_events.py @@ -1,14 +1,12 @@ -from dataclasses import field from typing import Sequence -import pydantic +from pydantic import Field from common.credentials import Credentials from . import AbstractAgentEvent -@pydantic.dataclasses.dataclass(frozen=True) class CredentialsStolenEvent(AbstractAgentEvent): """ An event that occurs when an agent collects credentials from the victim @@ -17,4 +15,4 @@ class CredentialsStolenEvent(AbstractAgentEvent): :param stolen_credentials: The credentials that were stolen by an agent """ - stolen_credentials: Sequence[Credentials] = field(default_factory=list) + stolen_credentials: Sequence[Credentials] = Field(default_factory=list)