Skip to content

Commit

Permalink
Fix: Correct dynamic tag handling in tagger analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
jkppr committed Oct 18, 2024
1 parent 4d6e1e6 commit f656946
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions timesketch/lib/analyzers/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f656946

Please sign in to comment.