diff --git a/sanguo_trader/persistence.py b/sanguo_trader/persistence.py index 85e15da..141b2ad 100644 --- a/sanguo_trader/persistence.py +++ b/sanguo_trader/persistence.py @@ -78,8 +78,10 @@ def save_account(db_path: str, account: dict[str, Any]) -> int: account.get("stamp_duty_rate", 0.0005), account.get("transfer_fee_rate", 0.00001), account.get("min_commission", 5.0), - account.get("status", "pending"), account.get("start_date"), - account.get("end_date"), _now(), _now(), + account.get("status", "pending"), + account.get("start_date") or account.get("start"), + account.get("end_date") or account.get("end"), + _now(), _now(), ), ) conn.commit()