From 1e86cc2896d9473a0c64a86c1b2c0bb06a8f5fac Mon Sep 17 00:00:00 2001 From: OG T Date: Thu, 16 Apr 2026 01:42:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(flywheel):=20=E4=BF=AE=E6=AD=A3=20incidents?= =?UTF-8?q?.outcomes=20=E2=86=92=20outcome=20=E6=AC=84=E4=BD=8D=E9=8C=AF?= =?UTF-8?q?=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GET /api/v1/stats/summary 觸發 UndefinedColumnError: column "outcomes" does not exist 實際欄位為 incidents.outcome (json 型別) 2026-04-16 Claude Sonnet 4.6 Asia/Taipei Co-Authored-By: Claude Sonnet 4.6 --- apps/api/src/services/flywheel_stats_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/services/flywheel_stats_service.py b/apps/api/src/services/flywheel_stats_service.py index 7bc5914a..b7c8e702 100644 --- a/apps/api/src/services/flywheel_stats_service.py +++ b/apps/api/src/services/flywheel_stats_service.py @@ -311,7 +311,7 @@ class FlywheelStatsService: success_q = await db.execute( text( "SELECT COUNT(*) FROM incidents WHERE created_at >= :today" - " AND outcomes::text LIKE '%execution_success%true%'" + " AND outcome::text LIKE '%execution_success%true%'" ), {"today": today_start}, )