From f656946c3ff8975f35244013405cb9110a782bd8 Mon Sep 17 00:00:00 2001 From: janosch Date: Fri, 18 Oct 2024 11:18:02 +0000 Subject: [PATCH] Fix: Correct dynamic tag handling in tagger analyzer --- timesketch/lib/analyzers/tagger.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/timesketch/lib/analyzers/tagger.py b/timesketch/lib/analyzers/tagger.py index bda37d64df..77ba93d2dc 100644 --- a/timesketch/lib/analyzers/tagger.py +++ b/timesketch/lib/analyzers/tagger.py @@ -129,10 +129,13 @@ def tagger(self, name, config): for mod in config.get("modifiers", []): if isinstance(tag_value, str): tag_value = self.MODIFIERS[mod](tag_value) - if isinstance(tag_value, Iterable): - dynamic_tag_values.extend(tag_value) - else: + + if isinstance(tag_value, str): dynamic_tag_values.append(tag_value) + elif isinstance(tag_value, Iterable): + dynamic_tag_values.extend(tag_value) + elif tag_value is not None: + dynamic_tag_values.append(str(tag_value)) event.add_tags(dynamic_tag_values) event.add_emojis(emojis_to_add)