round 3
This commit is contained in:
@@ -12,15 +12,18 @@ class Child(BaseModel):
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, d: dict):
|
||||
obj = cls(
|
||||
return cls(
|
||||
name=d.get('name'),
|
||||
age=d.get('age'),
|
||||
tasks=d.get('tasks', []),
|
||||
rewards=d.get('rewards', []),
|
||||
points=d.get('points', 0),
|
||||
image_id=d.get('image_id')
|
||||
image_id=d.get('image_id'),
|
||||
id=d.get('id'),
|
||||
created_at=d.get('created_at'),
|
||||
updated_at=d.get('updated_at')
|
||||
|
||||
)
|
||||
return cls._apply_base_fields(obj, d)
|
||||
|
||||
def to_dict(self):
|
||||
base = super().to_dict()
|
||||
|
||||
Reference in New Issue
Block a user