[tasks] Fix emacs not updating or completing

This commit is contained in:
2025-10-29 17:12:48 -04:00
parent bdfbd3e5c0
commit cd60ac6387
4 changed files with 36 additions and 16 deletions

View File

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