From 096fbbf5f608a039777b7666bf47722fad0943e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Tue, 7 Jul 2026 11:05:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20sqlite3.Row=E6=B2=A1=E6=9C=89.get()?= =?UTF-8?q?=E6=96=B9=E6=B3=95,=20r.get('cost',0)=E9=9D=99=E9=BB=98?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E2=86=92=E6=94=B9=E4=B8=BAr['cost']=20if=20r?= =?UTF-8?q?['cost']=20else=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/mofin_collect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mofin_collect.py b/scripts/mofin_collect.py index 8781ccbd..a35c65e9 100644 --- a/scripts/mofin_collect.py +++ b/scripts/mofin_collect.py @@ -69,7 +69,7 @@ try: from strategy_lifecycle import reassess_with_context result = reassess_with_context( code, name, r["price"], - r.get("cost", 0), r.get("shares", 0), + r["cost"] if r["cost"] else 0, r["shares"] if r["shares"] else 0, r["action"] or "" ) if result and result.get("action"): @@ -100,7 +100,7 @@ try: from strategy_lifecycle import reassess_with_context result = reassess_with_context( code, name, r["price"], - r.get("cost", 0), r.get("shares", 0), + r["cost"] if r["cost"] else 0, r["shares"] if r["shares"] else 0, "" ) if result and result.get("action"):