feat: Fix badge names returning null in profile endpoint #143
@ -4,6 +4,8 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from pydantic import ConfigDict, Field
|
||||||
|
|
||||||
from devplacepy.schemas.base import _Out
|
from devplacepy.schemas.base import _Out
|
||||||
|
|
||||||
|
|
||||||
@ -62,8 +64,9 @@ class PollOut(_Out):
|
|||||||
|
|
||||||
|
|
||||||
class BadgeOut(_Out):
|
class BadgeOut(_Out):
|
||||||
name: Optional[str] = None
|
name: Optional[str] = Field(None, alias="badge_name")
|
||||||
created_at: Optional[str] = None
|
created_at: Optional[str] = None
|
||||||
|
model_config = ConfigDict(populate_by_name=True)
|
||||||
|
|
||||||
|
|
||||||
class PostOut(_Out):
|
class PostOut(_Out):
|
||||||
@ -202,3 +205,4 @@ class MessageOut(_Out):
|
|||||||
|
|
||||||
|
|
||||||
CommentItemOut.model_rebuild()
|
CommentItemOut.model_rebuild()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user