feat: mo_data.py unified read layer (DB-first, JSON fallback) + cash_log table + batch JSON→DB migration (16 files)
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
"""Remove held stocks from watchlist"""
|
||||
|
||||
import json, os
|
||||
from mo_data import read_portfolio, read_decisions, read_watchlist
|
||||
|
||||
WL = "/home/hmo/web-dashboard/data/watchlist.json"
|
||||
DEC = "/home/hmo/web-dashboard/data/decisions.json"
|
||||
|
||||
holding_codes = set()
|
||||
pf = json.load(open("/home/hmo/web-dashboard/data/portfolio.json"))
|
||||
pf = mo_data.read_portfolio()
|
||||
for h in pf.get("holdings", []):
|
||||
c = h.get("code", "")
|
||||
if c:
|
||||
|
||||
Reference in New Issue
Block a user