From 3030eb158db418e19c57e1e26169cf217a27ca8d Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 11 Apr 2025 23:35:25 +0800 Subject: [PATCH] update --- app/api/v1/tryon.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/app/api/v1/tryon.py b/app/api/v1/tryon.py index 9ec70ba..027c304 100644 --- a/app/api/v1/tryon.py +++ b/app/api/v1/tryon.py @@ -132,15 +132,6 @@ async def check_tryon_status( tryon_history.status = TryonStatus.COMPLETED tryon_history.completion_url = url await db.commit() + await db.refresh(tryon_history) - return StandardResponse(code=200, message="检查试穿状态成功", data={ - "history_id": tryon_history.id, - "status": tryon_history.status, - "completion_url": url - }) - else: - return StandardResponse(code=200, message="检查试穿状态成功", data={ - "history_id": tryon_history.id, - "status": tryon_history.status, - "completion_url": tryon_history.completion_url - }) + return StandardResponse(code=200, message="检查试穿状态成功", data=TryonHistoryModel.model_validate(tryon_history))