Skip to content

Commit 4569150

Browse files
committed
修复同步bug
1 parent f06dce1 commit 4569150

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

services/external_sync.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
from typing import Any
66

7-
from services.chatgpt_sync import persist_cpa_sync_result, upload_chatgpt_account_to_cpa
7+
from services.chatgpt_sync import (
8+
_get_account_extra,
9+
persist_cpa_sync_result,
10+
upload_chatgpt_account_to_cpa,
11+
)
812

913

1014
def sync_account(account) -> list[dict[str, Any]]:
@@ -20,7 +24,7 @@ class _A:
2024

2125
a = _A()
2226
a.email = account.email
23-
extra = account.extra or {}
27+
extra = _get_account_extra(account)
2428
a.access_token = extra.get("access_token") or account.token
2529
a.refresh_token = extra.get("refresh_token", "")
2630
a.id_token = extra.get("id_token", "")
@@ -40,7 +44,7 @@ class _A:
4044
codex_proxy_url = str(config_store.get("codex_proxy_url", "") or "").strip()
4145
if codex_proxy_url:
4246
upload_type = str(config_store.get("codex_proxy_upload_type", "at") or "at").strip().lower()
43-
extra = account.extra or {}
47+
extra = _get_account_extra(account)
4448

4549
class _CP:
4650
pass

0 commit comments

Comments
 (0)