From ae889bff7d9f344f51037e3b8fea30c3993c93a7 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Wed, 30 Jul 2025 17:50:59 -0400 Subject: [PATCH] [tasks] Fix bug in note str method --- vrobbler/apps/tasks/models.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vrobbler/apps/tasks/models.py b/vrobbler/apps/tasks/models.py index d5ea7fa..33c02a8 100644 --- a/vrobbler/apps/tasks/models.py +++ b/vrobbler/apps/tasks/models.py @@ -39,11 +39,12 @@ class TaskLogData(JSONDataclass): def notes_as_str(self) -> str: """Return formatted notes with line breaks and no keys""" note_block = "" - if not self.notes: - return note_block + if isinstance(self.notes, list): + note_block = "
".join(self.notes) - for id, content in self.notes.items(): - note_block += content + "
" + if isinstance(self.notes, dict): + for id, content in self.notes.items(): + note_block += content + "
" return note_block