修复复盘交易记录并发迁移 prev_entry_tf 导致加载失败。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 13:40:33 +08:00
parent 3328b7fcc1
commit cfcc0596ff
2 changed files with 17 additions and 1 deletions
+7
View File
@@ -326,6 +326,9 @@ def register_options_review_routes(app: Flask, cfg: dict[str, Any], repo_root: s
"pages": pages,
}
)
except Exception as e:
print(f"[options_review_trades] {e}", flush=True)
return jsonify({"ok": False, "msg": f"加载交易记录失败: {e}"}), 500
finally:
conn.close()
@@ -447,6 +450,10 @@ def register_options_review_routes(app: Flask, cfg: dict[str, Any], repo_root: s
)
stats["source_types"] = list(SOURCE_TYPES)
stats["source_labels"] = SOURCE_LABELS
stats["ok"] = True
return jsonify(stats)
except Exception as e:
print(f"[options_review_stats] {e}", flush=True)
return jsonify({"ok": False, "msg": f"加载统计失败: {e}"}), 500
finally:
conn.close()