From 514d177b7ba0ff4c58a5b21974f06bc2955dd6e5 Mon Sep 17 00:00:00 2001 From: megaproxy Date: Tue, 28 Apr 2026 10:55:50 +0000 Subject: [PATCH] Fix cashflow: use DB column name 'description' not ORM attribute name The Transaction model maps description_enc -> 'description' column. Raw SQL must use the actual DB column name. Co-Authored-By: Claude Sonnet 4.6 --- backend/app/api/v1/predictions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/v1/predictions.py b/backend/app/api/v1/predictions.py index 6accb3a..8130169 100644 --- a/backend/app/api/v1/predictions.py +++ b/backend/app/api/v1/predictions.py @@ -214,7 +214,7 @@ async def cashflow_forecast( # Fetch recurring transactions (expenses) rec_result = await db.execute(text(""" - SELECT description_enc, amount::float, recurring_rule, date + SELECT description, amount::float, recurring_rule, date FROM transactions WHERE user_id = CAST(:uid AS uuid) AND is_recurring = TRUE