mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-05-19 09:28:47 +02:00
Exclude SALARY and DEPOSITO from agent recent-transactions tool
All checks were successful
Deploy to VPS / deploy (push) Successful in 13s
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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user