[scrobbles] CLean up some dataclasses
This commit is contained in:
@ -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
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user