Fixing build
This commit is contained in:
@@ -26,15 +26,15 @@ class SongCommentRead(BaseModel):
|
||||
created_at: datetime
|
||||
|
||||
@classmethod
|
||||
def from_model(cls, c: object) -> "SongCommentRead":
|
||||
def from_model(cls, c: object) -> SongCommentRead:
|
||||
return cls(
|
||||
id=getattr(c, "id"),
|
||||
song_id=getattr(c, "song_id"),
|
||||
body=getattr(c, "body"),
|
||||
author_id=getattr(c, "author_id"),
|
||||
author_name=getattr(getattr(c, "author"), "display_name"),
|
||||
author_avatar_url=getattr(getattr(c, "author"), "avatar_url"),
|
||||
timestamp=getattr(c, "timestamp"),
|
||||
id=c.id,
|
||||
song_id=c.song_id,
|
||||
body=c.body,
|
||||
author_id=c.author_id,
|
||||
author_name=c.author.display_name,
|
||||
author_avatar_url=c.author.avatar_url,
|
||||
timestamp=c.timestamp,
|
||||
tag=getattr(c, "tag", None),
|
||||
created_at=getattr(c, "created_at"),
|
||||
created_at=c.created_at,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user