diff --git a/rpc/timeline_service.py b/rpc/timeline_service.py index 0c57895..61cdbca 100644 --- a/rpc/timeline_service.py +++ b/rpc/timeline_service.py @@ -101,13 +101,13 @@ def merge_previous_timeline( session.add(tl) return - memo = {int(m.subject_id): m} + memo = {int(m.subject_id): m.model_dump()} memo[req.subject.id] = SubjectMemo( subject_id=str(req.subject.id), collect_comment=escaped, collect_rate=req.rate, - ) + ).model_dump() if tl.batch: img = BatchSubjectImage.validate_python(phpseralize.loads(tl.img.encode())) @@ -120,9 +120,7 @@ def merge_previous_timeline( ) tl.batch = 1 - tl.memo = php.serialize( - {key: value.model_dump() for key, value in memo.items()} - ) + tl.memo = php.serialize(memo) tl.img = php.serialize({key: value.model_dump() for key, value in img.items()}) session.add(tl)