Fix subscriptions page including income transactions

Salary and other income marked is_recurring=True were being returned
alongside expense subscriptions. Added type='expense' filter so only
outgoing recurring transactions appear.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-04-23 23:00:09 +00:00
parent 8fff5f4217
commit 5ed9c52929

View file

@ -34,6 +34,7 @@ async def get_subscriptions(
select(Transaction).where( select(Transaction).where(
Transaction.user_id == user.id, Transaction.user_id == user.id,
Transaction.is_recurring == True, Transaction.is_recurring == True,
Transaction.type == "expense",
Transaction.deleted_at.is_(None), Transaction.deleted_at.is_(None),
) )
) )