Ensure Pydantic model serializes to JSON-compatible format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user