From 6c4e7881101cc9f429896c24fc592651edd92c29 Mon Sep 17 00:00:00 2001 From: Derek LaHousse Date: Thu, 30 Dec 2021 09:25:44 -0500 Subject: [PATCH] It seems alright to leave the field empty, just have to check that it is empty --- misp_modules/modules/import_mod/csvimport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misp_modules/modules/import_mod/csvimport.py b/misp_modules/modules/import_mod/csvimport.py index 34eed8c..6bd79b7 100644 --- a/misp_modules/modules/import_mod/csvimport.py +++ b/misp_modules/modules/import_mod/csvimport.py @@ -224,7 +224,8 @@ class CsvParser(): @staticmethod def __deal_with_tags(attribute): - attribute['Tag'] = [{'name': tag.strip()} for tag in attribute['Tag'].split(',')] + if 'Tag' in attribute.keys(): + attribute['Tag'] = [{'name': tag.strip()} for tag in attribute['Tag'].split(',')] def __get_score(self): score = 1 if 'to_ids' in self.header else 0