fix(cli): use json mode for model_dump serialization
PR Test / lint (pull_request) Successful in 2s

Ensure Pydantic model serializes to JSON-compatible format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 22:59:36 +08:00
parent fa46062698
commit 7915808413
+1 -1
View File
@@ -165,7 +165,7 @@ def login_command(
result = login.login_by_qrcode()
if result.success and result.cookie_str:
manager.save_cookie(result.cookie_str)
return result.model_dump()
return result.model_dump(mode='json')
except Exception as e:
return {"success": False, "error": str(e)}