From de357bf156ccb71003eb4c1cd85e510eab2c8ecb Mon Sep 17 00:00:00 2001 From: Marcus Bakker Date: Mon, 21 Dec 2020 15:23:21 +0100 Subject: [PATCH] bugfix for issue #40 --- group_mapping.py | 5 +++-- interactive_menu.py | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/group_mapping.py b/group_mapping.py index b772638..91e8e0c 100644 --- a/group_mapping.py +++ b/group_mapping.py @@ -505,8 +505,9 @@ def generate_group_heat_map(groups, overlay, overlay_type, platform, software_gr health_is_called=health_is_called) if not groups_file_type: return None # the groups_file_type is not of the type FILE_TYPE_GROUP_ADMINISTRATION - elif isinstance(groups, str): - # reached when the groups are provided via the interactive menu + elif isinstance(groups[0], str) and len(groups) == 1: + # reached when the groups are provided via the interactive menu, or when the CLI only contained one argument + groups = groups[0] groups = groups.split(',') groups = list(map(lambda x: x.strip().lower(), groups)) else: # reached when the groups are provided via CLI arguments diff --git a/interactive_menu.py b/interactive_menu.py index 04cfff6..e823372 100644 --- a/interactive_menu.py +++ b/interactive_menu.py @@ -532,9 +532,13 @@ def _menu_groups(): eql_all_scores = not eql_all_scores elif choice == '6': - generate_group_heat_map(groups, groups_overlay, overlay_type, default_platform, + if groups_overlay == ['']: + groups_overlay = None + generate_group_heat_map([groups], groups_overlay, overlay_type, default_platform, software_group, eql_query_visibility, eql_query_detection, False, None, None, include_all_score_objs=eql_all_scores) + if groups_overlay is None: + groups_overlay = [''] _wait() elif choice == '9': interactive_menu()