Refactored fetch_details_for_display to return empty dict instead of empty array(because of type hint)

This commit is contained in:
VakarisZ 2021-01-28 15:33:33 +02:00
parent ad0b428699
commit d333e8c1c0
1 changed files with 3 additions and 1 deletions

View File

@ -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]: