[scrobbles] Fix note str output
All checks were successful
build & deploy / test (push) Successful in 1m41s
build & deploy / deploy (push) Has been skipped

This commit is contained in:
2026-03-11 11:35:01 -04:00
parent 2dc7acc536
commit 5d9834b63d
3 changed files with 115 additions and 16 deletions

View File

@ -950,18 +950,7 @@ class ScrobbleDetailView(DetailView):
FormClass = self.get_form_class()
log = self.object.log or {}
initial_notes = log.get("notes", [])
if (
isinstance(initial_notes, list)
and len(initial_notes) > 0
and isinstance(initial_notes[0], dict)
):
notes_str = note_list_to_str(notes)
else:
notes_str = "\n".join(initial_notes) if initial_notes else ""
notes_str_fixed = notes_str.encode("utf-8").decode("unicode_escape")
log["notes"] = notes_str_fixed
log["notes"] = self.object.logdata.notes_as_str()
return FormClass(initial=log)