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 <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-04-28 10:55:50 +00:00
parent a7e58d6aa1
commit 514d177b7b

View file

@ -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