diff --git a/config.py b/config.py index 944b5a9..dde39ef 100644 --- a/config.py +++ b/config.py @@ -156,13 +156,15 @@ def _parse_team_config(t: dict, index: int) -> dict: # 旧格式: account 是对象 email = t.get("user", {}).get("email", f"Team{index+1}") name = email.split("@")[0] if "@" in email else f"Team{index+1}" + auth_token = t.get("accessToken", "") return { "name": name, "account_id": t.get("account", {}).get("id", ""), "org_id": t.get("account", {}).get("organizationId", ""), - "auth_token": t.get("accessToken", ""), + "auth_token": auth_token, "owner_email": email, "owner_password": "", + "authorized": bool(auth_token), # 旧格式有 token 即视为已授权 "format": "old", "raw": t }