Exclude SALARY and DEPOSITO from agent recent-transactions tool
All checks were successful
Deploy to VPS / deploy (push) Successful in 13s

The 'last N transactions' answer was including salary deposits, which the
user reads as expense activity. Filter income types out at the query level.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Carlos Escalante
2026-04-29 22:55:53 -06:00
parent f556c392fb
commit ec716e698f

View File

@@ -118,7 +118,11 @@ def get_recent_transactions(
) -> list[dict]: ) -> list[dict]:
"""Recent transactions, newest first. Use filters to narrow down. For """Recent transactions, newest first. Use filters to narrow down. For
billing-cycle scoped totals prefer get_cycle_summary.""" billing-cycle scoped totals prefer get_cycle_summary."""
q = select(Transaction) q = select(Transaction).where(
Transaction.transaction_type.notin_(
[TransactionType.SALARY, TransactionType.DEPOSITO]
)
)
if source: if source:
q = q.where(Transaction.source == TransactionSource(source)) q = q.where(Transaction.source == TransactionSource(source))
if category_id is not None: if category_id is not None: