From 06e075553aba871411cdc878e8e51a78e1313b63 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 5 Aug 2025 01:56:20 -0400 Subject: [PATCH] [scrobbles] CLean up some dataclasses --- vrobbler/apps/scrobbles/dataclasses.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vrobbler/apps/scrobbles/dataclasses.py b/vrobbler/apps/scrobbles/dataclasses.py index d77a35c..56020bb 100644 --- a/vrobbler/apps/scrobbles/dataclasses.py +++ b/vrobbler/apps/scrobbles/dataclasses.py @@ -32,14 +32,13 @@ class JSONDataclass(JSONWizard): @dataclass class BaseLogData(JSONDataclass): - details: Optional[str] = None - notes: Optional[str] = None + description: Optional[str] = None + notes: Optional[list[str]] = None @dataclass class LongPlayLogData(JSONDataclass): - complete: Optional[bool] = None - serial_scrobble_id: Optional[int] = None + long_play_complete: bool = False @dataclass @@ -52,4 +51,7 @@ class WithPeopleLogData(JSONDataclass): if not self.with_people_ids: return [] - return [Person.objects.filter(id=pid) for pid in self.with_people_ids] + return [ + Person.objects.filter(id=pid).first() + for pid in self.with_people_ids + ]