[scrobbles] Fix note str output
This commit is contained in:
@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user