From d333e8c1c0cb14f4442a091fa5ef86a5091d1fcb Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Thu, 28 Jan 2021 15:33:33 +0200 Subject: [PATCH] Refactored fetch_details_for_display to return empty dict instead of empty array(because of type hint) --- .../zero_trust/monkey_findings/monkey_zt_details_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_details_service.py b/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_details_service.py index e73ce0cec..893f8221f 100644 --- a/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_details_service.py +++ b/monkey/monkey_island/cc/services/zero_trust/monkey_findings/monkey_zt_details_service.py @@ -23,7 +23,9 @@ class MonkeyZTDetailsService: details = details[0] details['latest_events'] = MonkeyZTDetailsService._get_events_without_overlap(details['event_count'], details['latest_events']) - return details + return details + else: + return {} @staticmethod def _get_events_without_overlap(event_count: int, events: List[object]) -> List[object]: